hi so this code is supposed to do that when I put %skript: {toptopcoins::1}% in a hologram that it will show the top richest player in gold but I keep getting the error There's no world in a periodic event if no world is given in the event...
[doublepost=1566620700,1566594894][/doublepost]bump
Code:
every 15 minutes:
loop all offlineplayers:
set {coins::%loop-offlineplayer's uuid%} to {topcoins::%loop-offlineplayer%}
loop {topcoins::*}:
add 1 to {_size}
if {_low.to.high.list::%loop-value%} is not set:
set {_low.to.high.list::%loop-value%} to loop-index
else:
set {_n} to 0
loop {_size} times:
set {_n} to {_n}+1
{_low.to.high.list::%loop-value-1%.%{_n}%} is not set
set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
stop loop
wait 1 tick
set {_n} to size of {_low.to.high.list::*}
loop {_low.to.high.list::*}:
set {_high.to.low.list::%{_n}%} to loop-value
set {_n} to {_n}-1
wait 1 tick
set {_i} to 0
loop all offlineplayers:
loop {_high.to.low.list::*}:
add 1 to {_topnumber}
set {_player} to "%loop-value%" parsed as offlineplayer
set {toptopcoins::%{_topnumber}%} to "&6&l%{_topnumber}% &e%{_player}% &8- &f%formatNum({topcoins::%loop-value%})% gold"