Solved Can't understand this section: (skript-gui)

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

za_breado

Member
Apr 12, 2024
23
2
3
23
I am having an issue where if I try run a command on click of a gui slot, it throws this error (attached below)

Skript Addons: skript-gui, skRayFall, SkBee, Skellet

Code:
Code:
command /gui:
    trigger:
        create a gui with virtual chest named "&c&lCOMPACTOR" with 1 rows:
            make gui slot 0 to red glass pane named " "
            make gui slot 8 to red glass pane named " "
            if {compactors::%player's uuid%::*} contains "stone":
                make gui slot 1 to stone named "&2&lSTONE ✔"
            else:
                make gui slot 1 to glowing grey wool named "&4&lSTONE ❌"
           
            if {compactors::%player's uuid%::*} contains "coal":
                make gui slot 2 to coal block named "&2&lCOAL ✔"
            else:
                make gui slot 2 to glowing grey wool named "&4&lCOAL ❌"
           
            if {compactors::%player's uuid%::*} contains "iron":
                make gui slot 3 to iron block named "&2&lIRON ✔"
            else:
                make gui slot 3 to glowing grey wool named "&4&lIRON ❌"
           
            if {compactors::%player's uuid%::*} contains "gold":
                make gui slot 4 to gold block named "&2&lGOLD ✔"
            else:
                make gui slot 4 to glowing grey wool named "&4&lGOLD ❌"
           
            if {compactors::%player's uuid%::*} contains "diamond":
                make gui slot 5 to diamond block named "&2&lDIAMOND ✔"
            else:
                make gui slot 5 to glowing grey wool named "&4&lDIAMOND ❌"
           
            if {compactors::%player's uuid%::*} contains "emerald":
                make gui slot 6 to emerald block named "&2&lEMERALD ✔"
            else:
                make gui slot 6 to glowing grey wool named "&4&lEMERALD ❌"
               
            if {docompact::%player's uuid%} is true:
                make gui slot 7 to glowing green wool named "&2&lCOMPACTING ENABLED ✔" to run:
                    play sound "block.note_block.bass" at volume 100 at pitch 1 to player
            else:
                make gui slot 7 to glowing red wool named "&4&lCOMPACTING DISABLED ❌" to run:
                    play sound "block.note_block.bass" at volume 100 at pitch 1 to player
            open last gui to player
            stop
 

Attachments

  • problem.png
    problem.png
    69 KB · Views: 26
Last edited:
It throws that error because that's not proper syntax.
I don't know much about skript-gui (seeing as I've never used it) but I know that you shouldn't need the to run. Try
AppleScript:
make gui slot 7 to glowing green wool named "&2&lCOMPACTING ENABLED ✔":
    play sound "block.note_block.bass" at volume 100 at pitch 1 to player
 
It throws that error because that's not proper syntax.
I don't know much about skript-gui (seeing as I've never used it) but I know that you shouldn't need the to run. Try
AppleScript:
make gui slot 7 to glowing green wool named "&2&lCOMPACTING ENABLED ✔":
    play sound "block.note_block.bass" at volume 100 at pitch 1 to player
I tried that before, but it played the sound when I opened the gui, and didn't play it when I clicked on the block
 
Is it possible that you forgot to indent the code line, which would result in an empty configuration section and a play sound on the GUI open?