1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

format gui slot doesnt work

Discussion in 'Skript' started by ferro31, Jan 2, 2022.

Thread Status:
Not open for further replies.
  1. ferro31

    ferro31 Member

    Joined:
    Nov 20, 2020
    Messages:
    4
    Likes Received:
    0
    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​
     
  2. yea rite

    yea rite Active Member

    Joined:
    Jul 11, 2021
    Messages:
    73
    Likes Received:
    5
    i dont think you need the "gui" inbetween format and slot
    (also vanilla gui better)
     
  3. ferro31

    ferro31 Member

    Joined:
    Nov 20, 2020
    Messages:
    4
    Likes Received:
    0
    i know, but vanilla gui doesnt work for me for some reason
     
  4. yea rite

    yea rite Active Member

    Joined:
    Jul 11, 2021
    Messages:
    73
    Likes Received:
    5
    Are you sure youre doing it correctly? heres how i do it

    Code (Text):
    1. command /guicommand:
    2.   permission: your.permission
    3.   trigger:
    4.     set {_gui} to chest inventory with 3 rows named "GUI Name"
    5.     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 (Text):
    1. command /guicommand:
    2.   permission: your.permission
    3.   trigger:
    4.     set {_gui} to chest inventory with 3 rows named "GUI Name"
    5.     loop integers between 0 and 26:
    6.       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 (Text):
    1. command /guicommand:
    2.   permission: your.permission
    3.   trigger:
    4.     set {_gui} to chest inventory with 3 rows named "GUI Name"
    5.     loop integers between 0 and 26:
    6.       set slot loop-number of {_gui} to gray stained glass pane named "%loop-number%"
    7.     set slot 4 of {_gui} to diamond sword named "blue stick"
     
Thread Status:
Not open for further replies.

Share This Page

Loading...