i need help with second loop-value where the second loop-value is a number

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

anipez1

New Member
Mar 21, 2024
5
0
1
code_language.skript:
command /ssg [<string>]:
    permission: perms.guiedit
    permission message: Unknown command. Type "/help" for help.
    trigger:
        loop {shopgui::*}:
            loop 72 times:
                set {sshopgui::%loop-value-1%::normal::%loop-value-2 - 1%} to slot (loop-value-2) - 1 of {shopgui}
                set {sshopgui::%loop-value-1%::underground::%loop-value-2 - 1%} to slot (loop-value-2) - 1 of {shopgui}
        send "&6&lSuccesfully saved all of shop gui!" to player

command /lsg [<string>]:
    permission: perms.guiedit
    permission message: Unknown command. Type "/help" for help.
    trigger:
        loop {shopgui::*}:
            loop 72 times:
                set slot (loop-value-2) - 1 of {shopgui::%loop-value-1%::normal} to {sshopgui::%loop-value%::normal::%loop-value-2%}
                set slot (loop-value-2) - 1 of {shopgui::%loop-value-1%::underground} to {sshopgui::%loop-value%::underground::%loop-value-2%}
        send "&6&lSuccesfully loaded all of shop gui!" to player

on inventory click:
    if event-inventory's name is "&9&l/shop":
        if {guiedit::%player%} is 0:
            cancel event

command /shop [<string>]:
    trigger:
        open {shopgui} for player

on load:
    set {shopgui::conveyors::normal} to chest inventory with 5 rows named "&9&l/shop"
    set {shopgui::droppers::normal} to chest inventory with 5 rows named "&9&l/shop"
    set {shopgui::upgraders::normal} to chest inventory with 5 rows named "&9&l/shop"
    set {shopgui::furnaces::underground} to chest inventory with 5 rows named "&9&l/shop"
    set {shopgui::conveyors::underground} to chest inventory with 5 rows named "&9&l/shop"
    set {shopgui::droppers::underground} to chest inventory with 5 rows named "&9&l/shop"
    set {shopgui::upgraders::underground} to chest inventory with 5 rows named "&9&l/shop"
    set {shopgui::furnaces::underground} to chest inventory with 5 rows named "&9&l/shop"

it gives me an error when i use loop-value-2 please help
i also cant put the image of the error it says "We ran into a problem."
 

Attachments

  • 1711743302073.png
    1711743302073.png
    36.8 KB · Views: 169
  • 1711743316494.png
    1711743316494.png
    37.6 KB · Views: 154