Skript: Bug with replace

Created on 9 May 2018  路  5Comments  路  Source: SkriptLang/Skript

Minecraft Version: PaperSpigot 1.12.2
Skript Version: I tried dev33 and dev35b and it works on both

Bugged Code:

command /bug:
    trigger:
        set {_test} to "hi"
        set {_testing} to "hello"

        replace all "hi" with "hola" in {_test} and {_testing}
        broadcast {_test} and {_testing}

Evidence:
image

Working Code:

command /works:
    trigger:
        set {_test} to "hi"
        set {_testing} to "hello"

        replace all "hi" with "hola" in {_test}
        replace all "hi" with "hola" in {_testing}
        broadcast {_test} and {_testing}

Evidence:
image

Explanation:
Basically, if you specify more than 1 variable to replace something in it'll change the rest of the variables to the value of the first variable.

bug medium

Most helpful comment

Well I will look into fixing what he changed then.

All 5 comments

Sounds like it could cause notable problems when working with lists. Thanks for the clear report!

Yeah, it was hell to debug, took me like an hour and a half to figure out why my variables we're the same value.

It broke when Tuke did some updates a long time ago, reported it as well but nothing happened. He claimed it wasn't him.

@TheLimeGlass You added support for replacing in multiple texts in https://github.com/bensku/Skript/pull/177 and merged in deb20b. It didn't even work between dev20 and dev23 (It gave this error) i doubt the PR is even tried, because you just added s to the expressions, also not to the right expressions. At least it didn't give any error since Tuke's fixes. So the bug exists since your PR.

Well I will look into fixing what he changed then.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

Anoniempje1234 picture Anoniempje1234  路  3Comments

TheClassic36 picture TheClassic36  路  3Comments

Romitou picture Romitou  路  3Comments

DeagoTheDoggo picture DeagoTheDoggo  路  3Comments