cancel event
close inventory of player
if event-slot is 10:
if player has permission "privatearena.tank.grass":
if {_arg} is not set:
clear inventory of player
clear all the potion effects of player
heal player
execute console command "/playerkits give tank %player%"
execute console command "/warp tankgrassca %player%"
send "&bTeleported to the arena." to player
if {_arg} is set:
set {tank::grassland::%player's uuid%} to true
send "" to {_arg}
send "&b&lPrivate Arena Request" to {_arg}
send "" to {_arg}
send "&b%player% &fhas invited you to &bGrassland Arena &ffor a &bTank &fduel." to {_arg}
send "" to {_arg}
send "&a<command:/accept>[Accept]<reset> &7or &c<command:/reject>[Reject]<reset>" to {_arg}
wait 10 seconds
set {tank::grassland::%player's uuid%} to false
send "&cTeleport request expired." to {_arg}
else:
send "&cYou don't have the permission to use this."
command /accept:
trigger:
set {_arg} to player
if {tank::grassland::%player's uuid%} is true:
clear inventory of player
clear all the potion effects of player
heal {_arg}
execute console command "/playerkits give tank %{_arg}%"
execute console command "/warp tankgrassca %{_arg}%"
send "&bTeleported to the arena."
set {tank::grassland::%player's uuid%} to false
stop
else:
send "&cYou are not allowed to use this command now."
stop```
#Variable issue
1 messages · Page 1 of 1 (latest)
When the player clicks on Accept [makes him send command /accept]. It sends "You are not allowed to use this command now" [which should be sent when the the variable isn't set to true]
Someone please help me figure out the issue.
what do u want to set to true
{tank::grassland::%player's uuid%}
it's already set to true?
I have set it to true and like assigned some action but it doesn't happen
It sends "You are not allowed to use this command now" [which should be sent when the the variable isn't set to true]
Oh alr.
i don't work with {_arg} and stuff
It is a variable
Yes.
and u can't figure it out how?
I think so it happens but the process after this isn't getting followed
So this is a skript for private arenas.
so /arena opens a gui for Player A who has perms to use it. Using that gui Player A can select a gamemode like tank, netherite pot and an arena to send a teleport request to player B
PLayer B which is arg-1 of command /arena gets a teleport request which he/she can accept or reject
I hope this gives you an idea about the skript.
My full code is 400+ lines and I am not sending it here because it might be a pain to view it.
true
If you want to load the skript then lmk, I will send it 😄
No errors are there
what version of skript are you using
have you tried debugging?
Yes, so I earlier the skript was working fine suddenly this error came and it isn't getting fixed.
i mean
have you added broadcast in to see what values are, and which conditions are passed?
I added that and the problem was fixed as Sovde identified the error and fixed it. But now this problem is up.
Well, debug again