MQXO Posted August 1, 2020 Share Posted August 1, 2020 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}" Link to comment Share on other sites More sharing options...
Checkmate128 Posted August 2, 2020 Share Posted August 2, 2020 I can't find anything that looks obviously wrong. Maybe try commenting out different lines inside the /score command to try to figure out what line is causing it. Also try removing the permission check to see if that is the issue. Also, why don't you just use the built-in command modifiers skript offers such as: "permission" and "permission message"? Owner of oldgaffle.minehut.gg. (my paintball server) Owner of karted.minehut.gg. (my mario kart server) Advocate of individual freedom, especially freedom of speech. Cooler than Stalemate128. Link to comment Share on other sites More sharing options...
_Tarna_ Posted August 2, 2020 Share Posted August 2, 2020 For the scoreboard, try making it like this function sb(p: player): set {_u} to {_p}'s uuid wipe {_p}'s sidebar set name of sidebar of {_p} to "{@Title}" set score "&r&r&r" in sidebar of {_p} to 9 set score "&bKills" in sidebar of {_p} to 8 set score "&f%{kills.kitpvp::%{_u}%}%" in sidebar of {_p} to 7 set score "&r&r" in sidebar of {_p} to 6 set score "&bDeaths" in sidebar of {_p} to 5 set score "&b&f%{deaths.kitpvp::%{_u}%}%" in sidebar of {_p} to 4 set score "&r" in sidebar of {_p} to 3 set score "&bIP" in sidebar of {_p} to 2 set score "&3SodexPvP.minehut.gg | SodexSMP.minehut.gg" in sidebar of {_p} to 1 every {@Update_Time} seconds: loop all players: sb(loop-player) Or you can also make the scoreboard just in a while loop. Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 | 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
AWorthySon Posted August 4, 2020 Share Posted August 4, 2020 Heya. I would not, and I'm pretty sure any experienced skripter would not recommend a periodical loop. I would recommend to use SkRayFall's ID based scoreboard, or alternatively use SkBee's board. An example could be: on join: while player is online: set title of player's board to "Server Name" set line 3 of player's board to " Balance: %player's balance" set line 2 of player's board to " " set line 1 of player's board to "ServerIP.minehut.gg" wait 2 ticks #This scoreboard would update 10 times a second. #and so on Please note any internal errors could be because of the 32 character limit. You cannot have a score be more than 32~ characters. Please ensure that is not the issue. I'm not sure if this counts for SkBee, but I do know it's an issue when it comes to SkRayFall. Always feel free to contact me or continue this thread if you need more help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now