Is it a bug or originally right?

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

    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.

Scan

Member
Feb 20, 2021
10
1
3
Code:
        if arg 1 is 1:
            wait 3 tick
            open chest with 6 row named "&cusershop" to player
            wait 1 tick
            if size of {list::*} <= 45:
                loop {list::*}:
                    set {usvalue::*} to split "%loop-value%" at "/"
                    set {count} to {usvalue::2} parsed as integer
                    set {item} to {tool::%loop-index%}
                    format slot loop-index parsed as integer - 1 of player with {count} of {item} to close then run [execute player command "/usershopbuy 1 %loop-index%"]


I have a problem in last line, "format slot..".
It shows well but if i click the first item in gui, at the end, the loop-index part is recognized as the last index.

Umm.. to put it more simply,

upload_2021-7-16_1-3-58.png


when I click first element(16 of brick), gui runs /usershopbuy 1 3, not /usershopbuy 1 1

I think back of "then run" is read after the click.


I can't think of any other way. :emoji_frowning:
I'm really sorry if it's difficult for you to understand since my English is not good.
 
Last edited:
Status
Not open for further replies.