I have skript (obv) and SkRayfall and i was updating a kitpvp skript from a random spigot post, i dont get any errors when im reloading it but when it actually runs i just get chat spam of "An internal error occurred when trying to execute this command." due to the "every 2 seconds:", after going through the code ive narrowed it down to the "command /score:" but im still very confused and would appreciate any help recieved
options:
#! MESSAGES
Kill_Message: &b&l$+1.5 &7and &a&l+15 EXP &7for killing &e%victim%
Death_Message: &e%victim% &7was killed by &e%attacker%
#! SCOREBOARD - ACTIONBAR
Title: &8[&3&lSodexPvP&8]
Update_Time: 2 # <-- IN SECONDS
Scoreboard_Permission: skript.kitpvp.scoreboard
#! KITPVP
KitPvP_Prefix: &b[KITPVP]
Reset_Kills_Permission: skript.kitpvp.reset.kills
Reset_Kills_Message: You have cleared %arg-3%'s kills.
Reset_Kills_No_Permission: You don't have permission to use this command.
Reset_Deaths_Permission: skript.kitpvp.reset.deaths
Reset_Deaths_Message: You have cleared %arg-3%'s deaths.
Reset_Deaths_No_Permission: You don't have permission to use this command.
Reload_Permission: skript.kitpvp.reload
Reload_Message: KitPvP Skript succesfully loaded
Reload_No_Permission: You don't have permission to use this command.
#! DO NOT EDIT DOWN HERE
on load:
send "&8[&3&LSodexPvP&8] &7Successfully loaded." to all players
on death:
if victim is a player:
if attacker is a player:
add 1 to {deaths.kitpvp::%uuid of victim%}
add 1 to {kills.kitpvp::%uuid of attacker%}
send "{@Kill_Message}" to attacker
set the death message to "{@Death_Message}"
command /score:
trigger:
if player has permission "{@Scoreboard_Permission}":
wipe player's sidebar
set name of sidebar of player to "{@Title}"
set score "&r&r&r" in sidebar of player to 11
set score "&bKills" in sidebar of player to 10
set score "&f%{kills.kitpvp::%uuid of player%}%" in sidebar of player to 9
set score "&r&r" in sidebar of player to 8
set score "&bDeaths" in sidebar of player to 7
set score "&b&f%{deaths.kitpvp::%uuid of player%}%" in sidebar of player to 6
set score "&r" in sidebar of player to 5
set score "&bIP" in sidebar of player to 4
set score "&3SodexPvP.minehut.gg | SodexSMP.minehut.gg" in sidebar of player to 3
every {@Update_Time} seconds:
loop all players:
make loop-player execute "/score"
on join:
if {kills.kitpvp::%uuid of player%} is not set:
set {kills.kitpvp::%uuid of player%} to 0
if {deaths.kitpvp::%uuid of player%} is not set:
set {deaths.kitpvp::%uuid of player%} to 0
command /kitpvp [<text>] [<text>] [<offline player>]:
trigger:
if arg 1 is "reset":
if player has permission "{@Reset_Kills_Permission}":
if arg 2 is "kills":
if arg 3 is set:
send "{@KitPvP_Prefix} {@Reset_Kills_Message}"
set {kills.kitpvp::%uuid of arg-3%} to 0
else:
if player has permission "{@Reset_Deaths_Permission}":
if arg 2 is "deaths":
if arg 3 is set:
send "{@KitPvP_Prefix} {@Reset_Deaths_Message}"
set {deaths.kitpvp::%uuid of arg-3%} to 0
else:
send "{@KitPvP_Prefix} {@Reset_Deaths_No_Permission}"
else:
send "{@KitPvP_Prefix} {@Reset_Kills_No_Permission}"
else if arg 1 is "reload":
if player has permission "{@Reload_Permission}":
make console execute command "sk reload kitpvp"
send "{@KitPvP_Prefix} {@Reload_Message}"
else:
send "{@KitPvP_Prefix} {@Reload_No_Permission}"