An if check repeats twice 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.

drillzy

Member
Aug 6, 2017
22
0
0
20
I have an error where when i right click a yellow dye, it goes through a process and gets to the point where it will check if the player has enough of that yellow dye then pursue to the rest of the stuff. for some reason, when the check goes false, it gives me the error twice when i want it to show it only once. please help me here.

Code:
on right click with yellow dye:
    if player has yellow dye named "&e&lMetal Head Skull":
        if {ydye1:%player%} is "true":
            if player has {@YLvl1} yellow dye named "&e&lMetal Head Skull":
                wait 1 tick
                loop {@YLvl1} times:
                    remove 1 yellow dye named "&e&lMetal Head Skull" from the player
                wait 1 tick
                execute console command "/rage 2 %player%"
                set {ydye1:%player%} to "false"
                set {ydye2:%player%} to "true"
                stop
            else:
                send "Not enough for level 1"
                stop
 
Status
Not open for further replies.