So I have a code sort of like this:
however, despite the first argument containing the aforementioned characters, it will not return true. I know this setup works, as if I replace "&k" with non-chat format related characters, it returns successfully. what is going on here, and why can't it detect the characters?
EDIT:
All right! Thanks to some help on the discord server, I eventually reached the conclusion that skript is pre-formatting my text in the contains line, meaning it's trying to look for a magic-formatted nothing, since the format code is the only thing there. The solution is making the contains line state
this detects the actual characters of the code.
EDIT 2:
welp, months afterward I have discovered the above "solution" does nothing but ban the letter k. after about an hour or so of stressing, I found a better solution that works just fine:
essentially, it pre-formats the arg and checks if it contains a specific kind of formatting. who woulda thunk.
Code:
command /example <text>:
trigger:
if arg-1 contains "&k":
send "no"
exit
however, despite the first argument containing the aforementioned characters, it will not return true. I know this setup works, as if I replace "&k" with non-chat format related characters, it returns successfully. what is going on here, and why can't it detect the characters?
EDIT:
All right! Thanks to some help on the discord server, I eventually reached the conclusion that skript is pre-formatting my text in the contains line, meaning it's trying to look for a magic-formatted nothing, since the format code is the only thing there. The solution is making the contains line state
Code:
if arg-1 contains uncolored "&&k"
EDIT 2:
welp, months afterward I have discovered the above "solution" does nothing but ban the letter k. after about an hour or so of stressing, I found a better solution that works just fine:
Code:
if colored arg-1 contains "<magic>"
Last edited: