#i need help with skript-gui and gui formatting

1 messages · Page 1 of 1 (latest)

frank dew
#

hello i need help with gui formatting.
im currently ussing skript-gui and trying to make list.

Im trying to make a list using loop, and looping a variable and making a gui with it.

function shovellist(p: player):
    create a gui with virtual chest inventory with 6 rows named "ALL SHOVELS ®" and shape "xxxxxxxxx", "x1234567x","x89sssssx","xsssssssx","xsssssssx", and "xxxxbxxxx":
        make gui slot "x" with gray stained glass pane named "&c✖"
        make gui slot "b" with barrier named "&cʟᴇꜰᴛ-ᴄʟɪᴄᴋ ᴛᴏ ɢᴏ ʙᴀᴄᴋ":
            make player execute command "/upgrade"

        loop 9 times:
            set {_st} to {t%loop-value%s}
            make gui slot "%loop-value%" with {_st}
    open the last gui for {_p}"```

here is my code, i don't know how can i make it so i  could do it 25 times, becasue idk how to shape my gui, any help?
latent scarab
#

!format

fossil condorBOT
# latent scarab !format

:technologist: Code Blocks

To make it easier for others to read your code, it is asked that you send it in a code block. On Discord, you can simply send this:

```
Code here
```

latent scarab
#

pls ^

#
This

#

"`" 3 of them

#

I am not sure that and shape "xxxxxxxxx", "x1234567x","x89sssssx","xsssssssx","xsssssssx", and "xxxxbxxxx"

is a thing although im not familiar with skript-gui my self but let me check

#

What error are you getting exactly?

frank dew
#

im not getting error, but i need to put 25 items in a gui, idk how to do it, becasue if i wan't to do it i can use %loop-value%, but gui shape only takes one symbol per one gui window

#

this is how it currently looks, but i need to fill the whole gui, and i want to do it all without typing a code for every slot

mystic sigil
#

Are you trying to make it go through a list of items and set the slots but keep it in the border?

rigid blaze
#

^

#

just have a list of the allowed slots, then use (loop-iteration)th element of ...

mystic sigil
frank dew
#

i camed across next problem, when loop-value is 10, its just completly bugs out.
I can show what is happening.

#

looped 9 times.

#

looped 10 times

#

code:

on load:
    clear {testlist::*}
    set {testlist::*} to 10,11,12,13,14,15,16,19,20,21

function shovellist(p: player):
    create a gui with virtual chest inventory with 6 rows named "ALL SHOVELS ®" and shape "xxxxxxxxx", "x1234567x","x89sssssx","xsssssssx","xsssssssx", and "xxxxbxxxx":
        make gui slot "x" with gray stained glass pane named "&c✖"
        make gui slot "b" with barrier named "&cʟᴇꜰᴛ-ᴄʟɪᴄᴋ ᴛᴏ ɢᴏ ʙᴀᴄᴋ":
            make player execute command "/upgrade"

        loop 9 times:
            set {_st} to {t%loop-value%s}
            set {_lsh} to (loop-value)th element of {testlist::*}
            make gui slot {_lsh} with {_st}
    open the last gui for {_p}
frank dew
#

can somebody help?

mystic sigil
#

I can't see any issues, have you tried debugging it at all?

frank dew
#

what do you mean debugging?

rigid blaze
frank dew
#

yeah i tried, but its hard to properlly do it, becasue i don't know all of the events/conditions, and i think its just skript or addon bug that make this happen, i would love to know if there's a way around.