Hello, I made a scoreboard skript and it was working, but when I used it on a different server it stopped working, can anyone help?
SKRIPT:
import:
org.bukkit.Bukkit
options:
server: &5&lNeo&8-&d&lEclipse
#
function formatNum(n:number) :: string:
set {_pre::*} to "K", "M", "B", "T"
if {_n} < 10^3:
return "%{_n}%"
set {_a} to 6
set {_i} to 1
while {_o} is not set:
if {_n} <= (10^{_a}-1):
set {_r} to ({_n}/10^({_a}-3))
set {_o} to "%{_r}%%{_pre::%{_i}%}%"
add 3 to {_a}
add 1 to {_i}
return {_o}
#
expression tps:
get:
set {_tps::*} to split "%Bukkit.getServer().spigot().getTPS()%" at ", "
set {_tps} to round({_tps::1} parsed as number)
return {_tps}
#
expression onlinevagter:
get:
set {_vagter::*} to all players where [input's group is "Guard" or "Captain" or "Chief"]
return size of {_vagter::*} ? 0
#
expression onlineStaffs:
get:
set {_staffs::*} to all players where [input's group is "Owner" or "HeadAdmin" or "Moderator" or "Helper" or "Developer" or "Builder"]
return size of {_staffs::*} ? 0
function ErBandeSat(uuid: string) :: string:
if {BANDE::SPILLER::%{_uuid}%} is set:
return "&f%{BANDE::SPILLER::%{_uuid}%}%"
else:
return "&cIngen"
#
on join:
while player is online:
set {_penge} to formatNum(player's balance)
set title of player's scoreboard to "{@server} &8( &f%number of all players% &8)"
set line 14 of player's scoreboard to "&7 &7"
set line 13 of player's scoreboard to "&7┌ &d&lPROFILE &8➡"
set line 12 of player's scoreboard to "&7│ &fName: &7%player%"
set line 11 of player's scoreboard to "&7│ &fRank: &7%player's group%"
set line 10 of player's scoreboard to "&7│ &fBalance: &7%{_penge}%"
set line 6 of player's scoreboard to "&7&7&7└"
set line 5 of player's scoreboard to "&7┌ &d&lSERVERINFO &8➡"
set line 4 of player's scoreboard to "&7│ &fOnline Staffs: &7%onlineStaffs%"
set line 3 of player's scoreboard to "&7│ &fOnline Guards: &7%onlinevagter%"
set line 2 of player's scoreboard to "&7&7&7└"
wait 2 seconds
if player has permission "staff.sk":
while player is online:
set {_penge} to formatNum(player's balance)
set title of player's scoreboard to "{@server} &8( &f%number of all players% &8)"
set line 14 of player's scoreboard to "&7 &7"
set line 13 of player's scoreboard to "&7┌ &d&lPROFILE &8➡"
set line 12 of player's scoreboard to "&7│ &fName: &c%player%"
set line 11 of player's scoreboard to "&7│ &fRank: &c%player's group%"
set line 10 of player's scoreboard to "&7│ &fBalance: &7%{_penge}%"
set line 6 of player's scoreboard to "&7&7&7└"
set line 5 of player's scoreboard to "&7┌ &d&lSERVERINFO &8➡"
set line 4 of player's scoreboard to "&7│ &fOnline Staffs: &7%onlineStaffs%"
set line 3 of player's scoreboard to "&7│ &fOnline Guards: &7%onlinevagter%"
set line 2 of player's scoreboard to "&7&7&7└"
wait 2 seconds
Error message: (in uploaded images below)