Holographic Leaderboards not showing name and doesnt apply "nobody" to 2-10

  • 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 community!

    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!

Ohjxss

Member
Feb 20, 2022
1
0
1
Hey! My holographic leaderboard works good for the most part, but it doesn't show the names of who has that many blocks mined, and only shows my stats all the way through, not showing "nobody" through 2-10 like I programmed it to in the skript. I did take the code from a one year old tutorial and added my variables to it, so because of the tutorials age that may be why it doesnt completely work anymore. Can someone help me fix the code? Thanks!
Code:
command /resetleaderboard:
    trigger:
set {_sorted::*} to sort((indices of {blockedmined::*}, {blocksmined::*}))
loop 10 times:
set {_leaderboardset} to loop-number + 3
set {_player} to {_sorted::%loop-value%}
set {_P} to {_sorted::%loop-value%} parsed as offlineplayer
set {_v} to {blocksmined::%{_player}%}
set {_l} to "&e&l#%loop-number% &f%{_P}%&7 - &e%{_v}% Blocks Mined"
if {_v} is set:
execute console command "dh l set blocksminedlb 1 %{_leaderboardset}% %{_l}%"
else:
execute console command "dh l set blocksminedlb 1 %{_leaderboardset}% &e&l#%loop-number% &fNobody&7 - &e0 Kill(s)"

every 1 minute:
broadcast "&eAll Leaderboards have been Reset!"
set {_sorted::*} to sort((indices of {blocksmined::*}, {blocksmined::*}))
loop 10 times:
set {_leaderboardset} to loop-number + 3
set {_player} to {_sorted::%loop-value%}
set {_P} to {_sorted::%loop-value%} parsed as offlineplayer
set {_v} to {blocksmined::%{_player}%}
set {_l} to "&e&l#%loop-number% &f%{_P}%&7 - &e%{_v}% Blocks Mined"
if {_v} is set:
execute console command "dh l set blocksminedlb 1 %{_leaderboardset}% %{_l}%"
else:
execute console command "dh l set blocksminedlb 1 %{_leaderboardset}% &e&l#%loop-number% &fNobody&7 - &e0 Kill(s)"

function sort(indices: strings, values: numbers, descending: boolean = true) :: strings:
loop {_indices::*}:
set {_sort::%{_values::%loop-index%}%.%loop-index%} to loop-value
return (reversed {_sort::*}) if {_descending} is true, else {_sort::*}
 

Attachments

  • image_2025-07-22_165454837.png
    image_2025-07-22_165454837.png
    701 KB · Views: 115