Solved "if " error.

  • 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 comminuty!

    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.

FUZIK

Active Member
Jan 26, 2017
115
10
18
23
Санкт-Петербург
github.com
Skript Version: 30
Skript Author: Bensku
Minecraft Version: 1.12.1

whether it is possible(if {} and {}:emoji_slight_smile:?
code_language.skript:
command iftest:
    trigger:
        if "white" = "black" and "white" = "block":
            broadcast "black is white!!"
            broadcast "what?"

Errors on Reload:

code_language.skript:
[ERROR]: Can't compare a text with ("black" and '"white" = "block"') (iftest.sk, line 3: if "white" = "black" and "white" = "block":')
 
Last edited:
Please use the help request format https://forums.skunity.com/wiki/help-request-layout/
What are you trying to check with this second portion here in red?
if "white" = "black" and "white" = "block":
It's the same as the first portion, and if statements do not work in this compound fashion I'm afraid. you could still have multiple variables like
if "test1" and "test2" = "test3"
but only one ='s can be present.
 
Please use the help request format https://forums.skunity.com/wiki/help-request-layout/
What are you trying to check with this second portion here in red?
if "white" = "black" and "white" = "block":
It's the same as the first portion, and if statements do not work in this compound fashion I'm afraid. you could still have multiple variables like
if "test1" and "test2" = "test3"
but only one ='s can be present.
thanks.
 
Status
Not open for further replies.