Message is "..."

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Marto_0

Member
Jul 14, 2017
15
1
3
So im trying to make a skript where u have to confirm with typing YES/NO in chat. But somehow its running the else: when im typing YES/NO. I cant find why its doing that. Ty for reading :emoji_slight_smile:
code_language.skript:
    if {Reaction::other::ClearYN::%player%} is true:
        if message = "YES":
            loop {Reaction::words::*}:
                remove loop-value from {Reaction::words::*}
            set {Reaction::other::ClearYN::%player%} to false
            message "&3Reaction>&8 &7Succesfully deleted all words!"
            cancel event
            stop
        if message = "NO":
            message "&3Reaction>&8 &7Succesfully Canceled to delete all words!"
            set {Reaction::Other::ClearYN::%player%} to false
            cancel event
            stop
        else:
            cancel event
            message "&3Reaction>&8 &7Are u sure to delete &4ALL&7 words from the list?! Type &eYES &7or &eNO&7!"
 
Insert some troubleshooting code to broadcast the value of
code_language.skript:
{Reaction::other::ClearYN::%player%}
to ensure it is being set properly. if it's running the else, then the issue is likely there.

actually derp, mis-read the indentation. strike that.
 
Try replacing the equal sign (=) to "contains" or "is". Also do, broadcast "%message%" to see if it has an output other than none.
 
Change
code_language.skript:
if message = "NO":
to
code_language.skript:
else if message = "NO":
 
So im trying to make a skript where u have to confirm with typing YES/NO in chat. But somehow its running the else: when im typing YES/NO. I cant find why its doing that. Ty for reading :emoji_slight_smile:
code_language.skript:
    if {Reaction::other::ClearYN::%player%} is true:
        if message = "YES":
            loop {Reaction::words::*}:
                remove loop-value from {Reaction::words::*}
            set {Reaction::other::ClearYN::%player%} to false
            message "&3Reaction>&8 &7Succesfully deleted all words!"
            cancel event
            stop
        if message = "NO":
            message "&3Reaction>&8 &7Succesfully Canceled to delete all words!"
            set {Reaction::Other::ClearYN::%player%} to false
            cancel event
            stop
        else:
            cancel event
            message "&3Reaction>&8 &7Are u sure to delete &4ALL&7 words from the list?! Type &eYES &7or &eNO&7!"
Are you using caps? Color codes? Do you have other on chat events that can mess up the code or a plugin?
 
Status
Not open for further replies.