need help with my leveling skript and scoreboard script
level system:
with this script I get this error:
There's no player/console in a periodical event
scoreboard:
and here I have the problem that level is <none> but in chat you can see your level
level system:
Code:
variables:
{level::%player%} = 1
{max::%player%} = 10
{xp::%player%} = 0
on chat:
set message format to "&7[&a%{level::%player%}%&7] %player's prefix%%player's displayname%: %message%"
on death:
if attacker is a player:
add 2 to {xp::%attacker%}
every 0.2 seconds:
loop all players:
if {xp::%loop-player%} is higher or equal to {max::%loop-player%}:
message "&aYou've leveled up to %{level::%loop-player%}%" to player
add 40 to {max::%loop-player%}
set {xp::%loop-player%} to 0
add 1 to {level::%loop-player%}
on break of coal ore:
add 0.5 to {xp::%player%}
There's no player/console in a periodical event
scoreboard:
Code:
every 1 second:
loop all players:
set title of loop-player's scoreboard to "&b&lBLOCKPLAY"
set line 7 of loop-player's scoreboard to "&7&m--------------------"
set line 6 of loop-player's scoreboard to "&bPLAYERS&7>%number of all players%"
set line 5 of loop-player's scoreboard to "&bLEVEL&7>%{level::loop-player}%"
set line 4 of loop-player's scoreboard to "&bRANK&7>%loop-player's prefix%"
set line 3 of loop-player's scoreboard to "&bPING>&7%loop-player's ping%"
set line 2 of loop-player's scoreboard to "&7&m -------------------"
set line 1 of loop-player's scoreboard to "&bBlockPlay.cc"