Functions not working

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

DZsquid

New Member
Jul 24, 2017
5
0
0
34
I am trying to test a new scoreboard skript I found off of the spigot website to see if it works so I can fix something else, but it doesnt work. Heres a screen shot of my plugins

upload_2020-1-18_19-6-23.png


and heres the code I found thats not working:
every 5 seconds:
loop all players:
refreshScoreboard(loop-player)

function refreshScoreboard(p: player):
wipe {_p}'s sidebar
set {_uuid} to uuid of {_p}
set name of sidebar of {_p} to "&5&lArena"
set score "&d&m«--------------------«" in sidebar of {_p} to 16
set score " &5Kills &7» %{ab::%{_uuid}%::kills}%" in sidebar of {_p} to 15
set score " &5Deaths &7» %{ab::%{_uuid}%::deaths}%" in sidebar of {_p} to 14
set score "&d&m»--------------------»" in sidebar of {_p} to 11

on death of player:
attacker is a player
victim is a player
add 1 to {ab::%uuid of attacker%::kills}
add 1 to {ab::%uuid of victim%::deaths}


The kill counter wasnt working when other players were online too so I wanted to try this but the error says: "The function 'refreshScoreboard' does not exist (ffa.sk, line 3: refreshScoreboard(loop-player)')"

any fix? thanks :emoji_grinning:
 
Status
Not open for further replies.