2

I need help with the plugin skript

WolfIsFluffy 2/12/21 6:15 pm
99
2/12/2021 7:38 pm
code"
variables:
{Players} = 0
command /wc:
aliases: /waterclutch, /water clutch
description: Used to start a match of watercluth
trigger:
if {Players} = 1:
teleport the player to the location (0, 128, 0)
if {Players} = 2:
teleport the player to the location (0, 128, 5)
else:
send "Lobby full: %{Players}% players in lobby "
on command "/wc":
add 1 to {Players}
on command "/wcreset":
remove %{Players}% to {Players}
wait 1 second
broadcast "&aReset successful!"
"
I am attempting to reset the variable by subtracting it by its self but the script that is meant to do it is not working ie:
remove %{Players}% to {Players}
Any other ideas of how to do this?
Posted by
WolfIsFluffy
Level 1 : New Network
0

  Have something to say?

JoinSign in

7

Wannabe TommyInnit
02/12/2021 7:31 pm
Level 41 : Master Magical Boy
history
For Skript, you use command: instead of on command:
Was it the command you needed help with?
2
WolfIsFluffy
02/12/2021 7:32 pm
Level 1 : New Network
No but nice typo catch lol
2
WolfIsFluffy
02/12/2021 7:34 pm
Level 1 : New Network
wait nvm that was on purpose bc you cant remove and add variables on jus the command part so the "on command:" is used to add and subtract variables
2
Wannabe TommyInnit
02/12/2021 7:36 pm
Level 41 : Master Magical Boy
???
I don't understand
You're registering the command twice, is what I think.
You should minify your code only to have it register once, and yet again, there is no "on command:".
I suggest checking the SKUnity or SkriptHub docs.
2
Wannabe TommyInnit
02/12/2021 7:33 pm
Level 41 : Master Magical Boy
Well, I recommend using Pastebin to paste your code into as it preserves indentation.
2
WolfIsFluffy
02/12/2021 7:38 pm
Level 1 : New Network
this post no longer maters any ways because I took a break and found a solution lol
2
WolfIsFluffy
02/12/2021 7:29 pm
Level 1 : New Network
I am smart aparently I fixed the issue if you wondering the same thing here is my code
variables:
{Players} = 0
command /wc:
aliases: /waterclutch, /water clutch
description: Used to start a match of watercluth
trigger:
if {Players} = 0:
teleport the player to the location (0, 128, 0)
message "Joined as player 1"
if {Players} = 1:
teleport the player to the location (0, 128, 5)
message "joined as player 2"
on command "/wc":
if {Players} = 0:
add 1 to {Players}
if {Players} = 1:
add 1 to {Players}
else:
send "Lobby full! %{Players}% players are in this lobby "
on command "/wcreset":
if {Players} = 2:
remove 2 from {Players}
wait 1 second
broadcast "&aReset successful!"
else:
wait 1 second
broadcast "&4Unable to reset!"
2

Welcome