My skript doesn't work

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

Mango120108

Member
Jan 9, 2023
1
0
1
24
Can anyone tell me why this does not work:

{1_::%uuid of player%} is already defined

"
command /loot2 [<offline player>]:
permission: admin.sk
trigger:
if {_1::%uuid of arg-1%} is not set:
send "1" to arg-1
if {1_::%uuid of arg-1%} is not set:
send "2" to arg-1
else if {1_::%uuid of arg-1%} is set:
send "3" to arg-1
set {_1::%uuid of arg-1%} to {1_::%uuid of arg-1%}
send "4" to arg-1
send "_1: %{_1::%uuid of arg-1%}%" to arg-1
send "roll: %{1_::%uuid of arg-1%}%" to arg-1
else:
if {_2::%uuid of arg-1%} is not set:
broadcast "2"
set {_2::%uuid of arg-1%} to {1_::%uuid of arg-1%}
else:
if {_3::%uuid of arg-1%} is not set:
set {_3::%uuid of arg-1%} to {1_::%uuid of arg-1%}
else:
if {_4::%uuid of arg-1%} is not set:
set {_4::%uuid of arg-1%} to {1_::%uuid of arg-1%}
else:
if {_5::%uuid of arg-1%} is not set:
set {_5::%uuid of arg-1%} to {1_::%uuid of arg-1%}

command /testt1:
permission: admin.sk
trigger:
send "roll %{1_::%uuid of player%}%"
send ""
send "1 %{_1::%uuid of player%}%"
send "2 %{_2::%uuid of player%}%"
send "3 %{_3::%uuid of player%}%"
send "4 %{_4::%uuid of player%}%"
send "5 %{_5::%uuid of player%}%"
"

When i run it, and do /testt1 only %{1_::%uuid of player%}% comes back as what it should be, since it's already previously defined
 
Hi, sorry for the *super* late response; I've been off the forums for a while.

When you prefix a variable with _, like {_5} or {_3}, it'll only be saved within the context that it's used. In other terms, if you set {_4} to a number, it'll only be saved within that event or trigger.
 
Status
Not open for further replies.