1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

(solved) Need Help with level/scoreboard script

Discussion in 'Skript' started by Neptix92, Oct 25, 2022.

Thread Status:
Not open for further replies.
  1. Neptix92

    Neptix92 Member

    Joined:
    Oct 25, 2022
    Messages:
    2
    Likes Received:
    0
    need help with my leveling skript and scoreboard script
    level system:
    Code (Text):
    1. variables:
    2.     {level::%player%} = 1
    3.     {max::%player%} = 10
    4.     {xp::%player%} = 0
    5.  
    6. on chat:
    7.     set message format to "&7[&a%{level::%player%}%&7] %player's prefix%%player's displayname%: %message%"
    8.  
    9. on death:
    10.     if attacker is a player:
    11.         add 2 to {xp::%attacker%}
    12.  
    13. every 0.2 seconds:
    14.     loop all players:
    15.         if {xp::%loop-player%} is higher or equal to {max::%loop-player%}:
    16.             message "&aYou've leveled up to %{level::%loop-player%}%" to player
    17.             add 40 to {max::%loop-player%}
    18.             set {xp::%loop-player%} to 0
    19.             add 1 to {level::%loop-player%}
    20.  
    21. on break of coal ore:
    22.     add 0.5 to {xp::%player%}
    with this script I get this error:
    There's no player/console in a periodical event
    scoreboard:
    Code (Text):
    1. every 1 second:
    2.  loop all players:
    3.   set title of loop-player's scoreboard to "&b&lBLOCKPLAY"
    4.   set line 7 of loop-player's scoreboard to "&7&m--------------------"
    5.   set line 6 of loop-player's scoreboard to "&bPLAYERS&7>%number of all players%"
    6.   set line 5 of loop-player's scoreboard to "&bLEVEL&7>%{level::loop-player}%"
    7.   set line 4 of loop-player's scoreboard to "&bRANK&7>%loop-player's prefix%"
    8.   set line 3 of loop-player's scoreboard to "&bPING>&7%loop-player's ping%"
    9.   set line 2 of loop-player's scoreboard to "&7&m -------------------"
    10.   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
     
  2. Jake*

    Supporter

    Joined:
    Jan 30, 2022
    Messages:
    117
    Likes Received:
    6
    if the issue is solved mark the thread as solved
     
Thread Status:
Not open for further replies.

Share This Page

Loading...