Solved Loop problem

  • 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.

wesnoah3

Active Member
Aug 18, 2017
73
3
8
Skript Version: Skript 2.2 (dev20c)
Skript Author: Bensku
Minecraft Version: 1.12.2

---
code_language.skript:
            if player has permission "TT.gag.{_count}":
                format gui slot {_count} of player with dirt named "worked"
            else:
                format gui slot {_count} of player with gray glass pane named " "
            add 1 to {_count}
I can't figure out why all the gui slots are gray glass pane even when the player has the permission "TT.gag.0" and "TT.gag.48". Both slot 0 and 48 worked before putting in the else statement.
 
When variables are in a text or in another variable, they need % % around it.
 
Example is {var::%{_anotherVar}%}. But this isn't what your issue is on. Your problem needs % % around the variable inside a text.

I was only saying that to remind you what using % % around variables can be used in.
 
Example is {var::%{_anotherVar}%}. But this isn't what your issue is on. Your problem needs % % around the variable inside a text.

I was only saying that to remind you what using % % around variables can be used in.
But
code_language.skript:
            if player has permission "TT.gag.{_count}":
                format gui slot {_count} of player with dirt named "worked"
            add 1 to {_count}
Works but
code_language.skript:
            if player has permission "TT.gag.{_count}":
                format gui slot {_count} of player with dirt named "worked"
            else:
                format gui slot {_count} of player with gray glass pane named " "
            add 1 to {_count}
Doesn't. Wouldn't that mean it has something to due with the else?
 
Sigh. just do this, "TT.gag.%{_count}%"
That's the point I'm trying to make.
 
  • Like
Reactions: wesnoah3
Status
Not open for further replies.