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 SkBee scoreboard not working but has no errors on reload

Discussion in 'Skript' started by NotNinjaTalon, Aug 6, 2020.

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

    NotNinjaTalon Member

    Joined:
    Mar 2, 2020
    Messages:
    12
    Likes Received:
    0
    I'm having issues with my scoreboard. On reload i appears there are no errors but on reconnect the scoreboard doesn't appear nor does it when the player manually does /toggle. If anyone knows what my error and or problem could be please share your thoughts. Thanks, Talon.

    Scoreboard Skript (Pastebin): https://pastebin.com/6Mx31Kje

    Code (Text):
    1. #every 5 seconds:
    2.     #loop all players:
    3.         #set tab header to "&6&l*&e&l*&6&l* &6&l&nMERCHANT&6&l *&e&l*&6&l*" and footer to "&7merchant.minehut.gg (%number of online players%/%max players%)" for loop-player
    4.  
    5. function Scoreboard(player: player):
    6.     set title of {_p}'s scoreboard to "&6&l*&e&l*&6&l* &6&l&nMERCHANT&6&l *&e&l*&6&l*"
    7.     set line 15 of {_p}'s scoreboard to "&0"# in sidebar of {_p} to 15
    8.     set line 14 of {_p}'s scoreboard to "&6&l&nPLAYER"# in sidebar of {_p} to 14
    9.     set line 13 of {_p}'s scoreboard to "&6&lx &eName &f%{_p}%"# in sidebar of {_p} to 13
    10.     set line 12 of {_p}'s scoreboard to "&6&lx &eBalance &f$%format({_p}'s balance)%"# in sidebar of {_p} to 12
    11.     set line 11 of {_p}'s scoreboard to "&6&lx &eMobcoins &f%format({mobcoins::%{_p}%})%"# in sidebar of {_p} to 11
    12.     set line 10 of {_p}'s scoreboard to "&1"# in sidebar of {_p} to 10
    13.     set line 9 of {_p}'s scoreboard to "&6&l&nISLAND"# in sidebar of {_p} to 9
    14.     if {island.owner::%{_p}%} is not set:
    15.         set line 8 of {_p}'s scoreboard to "&6&lx &eOwner &f/is create"# in sidebar of {_p} to 8
    16.     else:
    17.         set line 8 of {_p}'s scoreboard to "&6&lx &eOwner &f%{island.owner::%{_p}%}%"# in sidebar of {_p} to 8
    18.     if {island.level::%{island.owner::%{_p}%}%} is not set:
    19.         set line 7 of {_p}'s scoreboard to "&6&lx &eLevel &f0"# in sidebar of {_p} to 7
    20.     else:
    21.         set line 7 of {_p}'s scoreboard to "&6&lx &eLevel &f%format({island.level::%{island.owner::%{_p}%}%})%"# in sidebar of {_p} to 7
    22.     if {island.members.%{island.owner::%{_p}%}%} is not set:
    23.         set line 6 of {_p}'s scoreboard to "&6&lx &eMembers &f0"# in sidebar of {_p} to 6
    24.     else:
    25.         set line 6 of {_p}'s scoreboard to "&6&lx &eMembers &f%amount of {island.members.%{island.owner::%{_p}%}%::*}%"# in sidebar of {_p} to 6
    26.         set line 5 of {_p}'s scoreboard to "&2"# in sidebar of {_p} to 5
    27.         set line 4 of {_p}'s scoreboard to "&6&l&nSERVER"# in sidebar of {_p} to 4
    28.         set line 3 of {_p}'s scoreboard to "&6&lx &eOnline &f%number of online players%/%max players%"# in sidebar of {_p} to 3
    29.         set line 2 of {_p}'s scoreboard to "&6&lx &eTotal Joins &f%{joins}%"# in sidebar of {_p} to 2
    30.         set line 1 of {_p}'s scoreboard to "&6&lx &eTPS &f%{server_tps}%"# in sidebar of {_p} to 1
    31. function format(n: number) :: text:
    32.     set {_data} to "QT,18|Q,15|T,12|B,9|M,6|k,3"
    33.     loop split {_data} at "|":
    34.         set {_s::*} to split loop-value at ","
    35.         {_n} >= 10 ^ {_s::2} parsed as number
    36.         return "%{_n} / 10 ^ {_s::2} parsed as number%%{_s::1}%"
    37.     return "%{_n}%"
    38.  
    39. command /toggle [<text>]:
    40.     trigger:
    41.         if {show_info::%player%} is not set:
    42.             set {show_info::%player%} to true
    43.             toggle player's scoreboard to on
    44.             send "&7Enabled your scoreboard." to player
    45.         else:
    46.             delete {show_info::%player%}
    47.             toggle player's scoreboard to off
    48.             send "&7Disabled your scoreboard." to player
    49.  
    50. on join:
    51.  clear player's scoreboard
    52.  while player is online:
    53.   Scoreboard(player)
    54.   wait 10 ticks
    Addons installed:
    SkBee, TuSKe, MorkazSk, SkDragon, Skellet, SkRayfall, SkQuery
    --- Double Post Merged, Aug 7, 2020, Original Post Date: Aug 6, 2020 ---
    Issue resolved I just made a simple error in my function that didn't understand who the {_p} was.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...