(solved) Need Help with level/scoreboard script

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

Neptix92

Member
Oct 25, 2022
2
0
1
25
need help with my leveling skript and scoreboard script
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%}
with this script I get this error:
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"
and here I have the problem that level is <none> but in chat you can see your level
 
Status
Not open for further replies.