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

Fridious

Member
Jun 23, 2017
33
0
0
46
code_language.skript:
command /hatstest:
    trigger:
        open chest with 6 rows named "&fTest" to player
        wait 3 ticks
        loop integers between 0 and inventory size of chest named "&fTest" - 1:
            set slot loop-number of chest named "&fTest" to light green stained glass pane named " "

What is wrong?
I want to set the light green stained glass pane on the first empty slot?

Can anyone help me?

Thank you :emoji_slight_smile:
 
Based off your code, you are trying to fill an empty chest menu GUI with light green stained glass pane. While your logic is pretty alright, your syntax is all over the place.

Here's basically the same code with syntax I found in the docs:

code_language.skript:
command /hatstest:
    trigger:
        open chest with 6 rows named "&fTest" to player
        wait 3 ticks
        loop integers between 0 and menu size of player's current inventory - 1:
            set slot loop-number of player's current inventory to light green stained glass pane named " "

The skUnity docs is a great resource for errors like these: when you believe your logic is right, but you're getting an error anyways. Most of the time it can just be the case of having to reword a few things.
 
Status
Not open for further replies.