Jump to content

Please help me with loops with skript


Meow_Squad

Recommended Posts

Hi, I was trying to make a scoreboard for my server but I tried to reload the skript and it came up with 5 errors.

I will put skripts of the variable AND the scoreboard down below.

Scoreboard:

every 5 seconds:
	loop all players:
		wipe sidebar of loop-player
		set name of sidebar of loop-player to  "&2&lSMPFunMeow"
		set score "&a&lPLAYER:" in sidebar of loop-player to 1
		set score "&7Money: %{basiccurrency::%loop-player%}%" in sidebar of loop-player to 0
		set score "&a%{kills::%player%}% &7| &c%{deaths::%player%}" in sidebar of loop-player to -1

Variables:

on join:
	remove player's uuid from {Joins::*}
	if {Joins::*} does not contain player's uuid:
		add player's uuid to {Joins::*}
		set {basiccurrency::%player%} to 0
		set {floracurrency::%player%} to 0
		set {gemscurrency::%player%} to 0
		set {deaths::%loop-player%} to 0
		set {kills::%loop-player%} to 0
		set {kdr::%loop-player%} to 0

Errors:

Line 3: Loop-player is not an nbt compound (line 3: wipe sidebar of loop-player')

Line 4: There's no loop that matches 'loop-player to "&2&lSMPFunMeow"' (line 4: set name of sidebar of loop-player to "&2&lSMPFunMeow"')

Line 5: There's no loop that matches 'loop-player to 1' (line 5: set score "&a&lPLAYER:" in sidebar of loop-player to 1')

Line 6: There's no loop that matches 'loop-player to 0' (line 6: set score "&7Money: %{basiccurrency::%loop-player%}%" in sidebar of loop-player to 0')

Line 7: There's no loop that matches 'loop-player to ' (line 7: set score "&a%{kills::%player%}% &7| &c%{deaths::%player%}%" in sidebar of loop-player to -1')

 

Edited by Meow_Squad
I forgot to put in the errors
Link to comment
Share on other sites

On 1/31/2022 at 1:38 AM, Meow_Squad said:

Hi, I was trying to make a scoreboard for my server but I tried to reload the skript and it came up with 5 errors.

I will put skripts of the variable AND the scoreboard down below.

Scoreboard:

every 5 seconds:
	loop all players:
		wipe sidebar of loop-player
		set name of sidebar of loop-player to  "&2&lSMPFunMeow"
		set score "&a&lPLAYER:" in sidebar of loop-player to 1
		set score "&7Money: %{basiccurrency::%loop-player%}%" in sidebar of loop-player to 0
		set score "&a%{kills::%player%}% &7| &c%{deaths::%player%}" in sidebar of loop-player to -1

Variables:

on join:
	remove player's uuid from {Joins::*}
	if {Joins::*} does not contain player's uuid:
		add player's uuid to {Joins::*}
		set {basiccurrency::%player%} to 0
		set {floracurrency::%player%} to 0
		set {gemscurrency::%player%} to 0
		set {deaths::%loop-player%} to 0
		set {kills::%loop-player%} to 0
		set {kdr::%loop-player%} to 0

Errors:

Line 3: Loop-player is not an nbt compound (line 3: wipe sidebar of loop-player')

Line 4: There's no loop that matches 'loop-player to "&2&lSMPFunMeow"' (line 4: set name of sidebar of loop-player to "&2&lSMPFunMeow"')

Line 5: There's no loop that matches 'loop-player to 1' (line 5: set score "&a&lPLAYER:" in sidebar of loop-player to 1')

Line 6: There's no loop that matches 'loop-player to 0' (line 6: set score "&7Money: %{basiccurrency::%loop-player%}%" in sidebar of loop-player to 0')

Line 7: There's no loop that matches 'loop-player to ' (line 7: set score "&a%{kills::%player%}% &7| &c%{deaths::%player%}%" in sidebar of loop-player to -1')

 

'wipe loop-player's sidebar'

'set name of sidebar of loop-player to "text"'

I don't know why the others are giving errors. Maybe try using only numbers that are greater than 0 for scores? (Eg 'set score "money" in sidebar of loop-player to 2'

Main MC account: Gam3rBoi (VIP in MH)

Alt MC account: *Gam3rBoi2147

Farcade server owner

Skripter with 6+ months experience + time learning coding concepts

Message me through the forums if you need anything!

Link to comment
Share on other sites

That goes in your loop, and replaces the old wipe and sidebar name you had.

Main MC account: Gam3rBoi (VIP in MH)

Alt MC account: *Gam3rBoi2147

Farcade server owner

Skripter with 6+ months experience + time learning coding concepts

Message me through the forums if you need anything!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...