Hi!
I have an issue which i am not seem to be able to resolve by myself.
I am filling a virtual inventory using a loop to create a slot selection GUI.
The loop-value fills the slot name just fine, but the linked command to all slots always ends up using the latest loop-value (in my case 20) no matter which slot i click.
Do you know a way to fix every command linked to the slots on every loop, so when i click slot 3 it uses the loop-value "3" in the command instead of number "20"?
If the problem description wasn't clear enough, please let me know!
Thank you for your kind help!
I have an issue which i am not seem to be able to resolve by myself.
I am filling a virtual inventory using a loop to create a slot selection GUI.
The loop-value fills the slot name just fine, but the linked command to all slots always ends up using the latest loop-value (in my case 20) no matter which slot i click.
code_language.skript:
loop 20 times:
format slot loop-value - 1 of player with white stained glass pane named "%loop-value%. location" to close then run [make player execute command "{@somecommand} %loop-value%"]
Do you know a way to fix every command linked to the slots on every loop, so when i click slot 3 it uses the loop-value "3" in the command instead of number "20"?
If the problem description wasn't clear enough, please let me know!
Thank you for your kind help!