Skript: Bug/Suggestion: can't set local variable and metadata value to a value in the same line of code

Created on 29 Jul 2018  路  4Comments  路  Source: SkriptLang/Skript

Skript dev37c
Reproduce with:

command /test:
    trigger:

        set {_test} and command sender's metadata value "test" to 123
        send "%{_test}%"
        send "%command sender's metadata value ""test""%"

{_test} will return <none>

bug enhancement needs-testing lowest

All 4 comments

I don't really think it was ever supposed to work like that, or was it? Anyway, that'd be a nice enhancement for sure

I'm not sure it's supposed to work either, it just felt natural to do since you can set multiple local variables at the same time like set {_a}, {_b} and {_c} to "something". You're right though, it might just be an enhancement

oh wait, i remember now why i considered this a bug!
i was using something like set {_test} and command sender's metadata value "test" to 123 in a script of mine, and it took me a long time to figure out why it wouldn't work. as it turned out, {_test} was set to none - however skript did not protest about my code

yes, this is supposed to either work or fail. pretty sure it did work in the past but would have to test.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

GiraffeCubed picture GiraffeCubed  路  3Comments

Eryk1983S picture Eryk1983S  路  3Comments

TrademarkTM picture TrademarkTM  路  4Comments

Anoniempje1234 picture Anoniempje1234  路  3Comments