Here is the skript:
command /leaderboard:
trigger:
if size of {points::*} is 0:
send "&cNo players have any points yet!" to player
stop
send "&6&lTop 10 Players Leaderboard:"
set {_uuids::*} to keys of {points::*}
set {_sorted::*} to {_uuids::*}
loop {_sorted::*}:
loop {_sorted::*}:
set {_i} to loop-index-1
set {_j} to loop-index-2
if {points::%{_sorted::%{_i}%}%} < {points::%{_sorted::%{_j}%}%}:
set {_temp} to {_sorted::%{_i}%}
set {_sorted::%{_i}%} to {_sorted::%{_j}%}
set {_sorted::%{_j}%} to {_temp}
loop 10 times:
set {_uuid} to {_sorted::%loop-number%}
if {_uuid} is not set:
stop loop
set {_player} to offline player {_uuid}
if {_player} is set:
set {_name} to name of {_player}
else:
set {_name} to "Unknown"
set {_points} to {points::%{_uuid}%}
send "&e%loop-number%&7. &f%{_name}% &7- &6%{_points}% &7points"
in line 'set {_player} to offline player {_uuid}', it doesnt understand it. what is the correct syntax? (It is a leaderboard skript)