Solved SkBee scoreboard not working but has no errors on reload

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

NotNinjaTalon

Member
Mar 2, 2020
12
1
1
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:
#every 5 seconds:
    #loop all players:
        #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
 
function Scoreboard(player: player):
    set title of {_p}'s scoreboard to "&6&l*&e&l*&6&l* &6&l&nMERCHANT&6&l *&e&l*&6&l*"
    set line 15 of {_p}'s scoreboard to "&0"# in sidebar of {_p} to 15
    set line 14 of {_p}'s scoreboard to "&6&l&nPLAYER"# in sidebar of {_p} to 14
    set line 13 of {_p}'s scoreboard to "&6&lx &eName &f%{_p}%"# in sidebar of {_p} to 13
    set line 12 of {_p}'s scoreboard to "&6&lx &eBalance &f$%format({_p}'s balance)%"# in sidebar of {_p} to 12
    set line 11 of {_p}'s scoreboard to "&6&lx &eMobcoins &f%format({mobcoins::%{_p}%})%"# in sidebar of {_p} to 11
    set line 10 of {_p}'s scoreboard to "&1"# in sidebar of {_p} to 10
    set line 9 of {_p}'s scoreboard to "&6&l&nISLAND"# in sidebar of {_p} to 9
    if {island.owner::%{_p}%} is not set:
        set line 8 of {_p}'s scoreboard to "&6&lx &eOwner &f/is create"# in sidebar of {_p} to 8
    else:
        set line 8 of {_p}'s scoreboard to "&6&lx &eOwner &f%{island.owner::%{_p}%}%"# in sidebar of {_p} to 8
    if {island.level::%{island.owner::%{_p}%}%} is not set:
        set line 7 of {_p}'s scoreboard to "&6&lx &eLevel &f0"# in sidebar of {_p} to 7
    else:
        set line 7 of {_p}'s scoreboard to "&6&lx &eLevel &f%format({island.level::%{island.owner::%{_p}%}%})%"# in sidebar of {_p} to 7
    if {island.members.%{island.owner::%{_p}%}%} is not set:
        set line 6 of {_p}'s scoreboard to "&6&lx &eMembers &f0"# in sidebar of {_p} to 6
    else:
        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
        set line 5 of {_p}'s scoreboard to "&2"# in sidebar of {_p} to 5
        set line 4 of {_p}'s scoreboard to "&6&l&nSERVER"# in sidebar of {_p} to 4
        set line 3 of {_p}'s scoreboard to "&6&lx &eOnline &f%number of online players%/%max players%"# in sidebar of {_p} to 3
        set line 2 of {_p}'s scoreboard to "&6&lx &eTotal Joins &f%{joins}%"# in sidebar of {_p} to 2
        set line 1 of {_p}'s scoreboard to "&6&lx &eTPS &f%{server_tps}%"# in sidebar of {_p} to 1
function format(n: number) :: text:
    set {_data} to "QT,18|Q,15|T,12|B,9|M,6|k,3"
    loop split {_data} at "|":
        set {_s::*} to split loop-value at ","
        {_n} >= 10 ^ {_s::2} parsed as number
        return "%{_n} / 10 ^ {_s::2} parsed as number%%{_s::1}%"
    return "%{_n}%"
 
command /toggle [<text>]:
    trigger:
        if {show_info::%player%} is not set:
            set {show_info::%player%} to true
            toggle player's scoreboard to on
            send "&7Enabled your scoreboard." to player
        else:
            delete {show_info::%player%}
            toggle player's scoreboard to off
            send "&7Disabled your scoreboard." to player
 
on join:
 clear player's scoreboard
 while player is online:
  Scoreboard(player)
  wait 10 ticks

Addons installed:
SkBee, TuSKe, MorkazSk, SkDragon, Skellet, SkRayfall, SkQuery
[doublepost=1596830163,1596713998][/doublepost]Issue resolved I just made a simple error in my function that didn't understand who the {_p} was.
 
  • Like
Reactions: Pierrelasse
Status
Not open for further replies.