Looping and making Gui slot with a function

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

MrGametop1

Member
Mar 10, 2017
36
0
6
24
Hello there so i am trying to create a loop that create gui slots with different functions.

But it cannot put the right information into the function part.

Code:
format slot {_i} of player with skull of {_name} named "&r" with lore "%{_name}%&7&m-" to close then run [kauctiontest(player, {_name%{_nummer}%}, {_nummer})]

it always take the latests loop and forwards that to the function.
[doublepost=1660752828,1660746749][/doublepost]
Hello there so i am trying to create a loop that create gui slots with different functions.

But it cannot put the right information into the function part.

Code:
format slot {_i} of player with skull of {_name} named "&r" with lore "%{_name}%&7&m-" to close then run [kauctiontest(player, {_name%{_nummer}%}, {_nummer})]

it always take the latests loop and forwards that to the function.

More specefic example

Code:
command /temp4:
    trigger:
        open chest with 6 rows named "%{_n}% %{_jailstedkauction}%" to player
        set {_nummer} to 0
        loop 10 times:
            add 1 to {_nummer}
            format slot {_nummer} of player with stone named "{_nummer}" with lore "%{_nummer}%" to close then run [testing(player, {_nummer})]

function testing(player: player, int: integer):
    message "{_int} %{_int}%" to {_player}
[doublepost=1660755485][/doublepost]
Hello there so i am trying to create a loop that create gui slots with different functions.

But it cannot put the right information into the function part.

Code:
format slot {_i} of player with skull of {_name} named "&r" with lore "%{_name}%&7&m-" to close then run [kauctiontest(player, {_name%{_nummer}%}, {_nummer})]

it always take the latests loop and forwards that to the function.
[doublepost=1660752828,1660746749][/doublepost]

More specefic example

Code:
command /temp4:
    trigger:
        open chest with 6 rows named "%{_n}% %{_jailstedkauction}%" to player
        set {_nummer} to 0
        loop 10 times:
            add 1 to {_nummer}
            format slot {_nummer} of player with stone named "{_nummer}" with lore "%{_nummer}%" to close then run [testing(player, {_nummer})]

function testing(player: player, int: integer):
    message "{_int} %{_int}%" to {_player}

I know i shouldn't use TuSke or SkQuery for gui's but i use 1.8.8
 
Status
Not open for further replies.