format gui slot doesnt work

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

ferro31

Member
Nov 20, 2020
4
0
1
23
I tried making a menu, and when i try to foram a gui slot, it shows an error.
error:
upload_2022-1-2_20-30-16.png

code:
command /gui:
trigger:
open virtual chest inventory with size 3 named "&4Parkour menu" to player
format gui slot 0 of player with stone named "&6Easy parkour!" to run:
send message "a" to player
close player's inventory​
 
i dont think you need the "gui" inbetween format and slot
(also vanilla gui better)
 
i know, but vanilla gui doesnt work for me for some reason
Are you sure youre doing it correctly? heres how i do it

Code:
command /guicommand:
  permission: your.permission
  trigger:
    set {_gui} to chest inventory with 3 rows named "GUI Name"
    set slot 0 of {_gui} to item named "name" with lore "lore" and "lore line 2"
You can also fill a gui if you want

Code:
command /guicommand:
  permission: your.permission
  trigger:
    set {_gui} to chest inventory with 3 rows named "GUI Name"
    loop integers between 0 and 26:
      set slot loop-number of {_gui} to gray stained glass pane named "%loop-number%"
the name of the glass pane will be the gui slot number
You can also fill a gui, then set individual slots to speed up the process of making the backround stuff

Code:
command /guicommand:
  permission: your.permission
  trigger:
    set {_gui} to chest inventory with 3 rows named "GUI Name"
    loop integers between 0 and 26:
      set slot loop-number of {_gui} to gray stained glass pane named "%loop-number%"
    set slot 4 of {_gui} to diamond sword named "blue stick"
 
Status
Not open for further replies.