Solved Why doesn't work why function?

  • 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.
uufff sorry xD
[doublepost=1577536086,1577536054][/doublepost]But i can't find a new version of the Skript plugin for Minecraft Spigot 1.8.9
 
The version in installed and this error came:
Code:
[13:33:37 WARN]: [Skript] Task #18 for Skript v2.2-dev36 generated an exception
java.lang.NoSuchMethodError: ch.njol.skript.command.Commands.loadCommand(Lch/njol/skript/config/SectionNode;Z)Lch/njol/skript/command/ScriptCommand;
    at ch.njol.skript.ScriptLoader.loadScript(ScriptLoader.java:621) ~[?:?]
    at ch.njol.skript.ScriptLoader.lambda$1(ScriptLoader.java:389) ~[?:?]
    at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:401) ~[?:?]
    at ch.njol.skript.ScriptLoader.lambda$0(ScriptLoader.java:331) ~[?:?]
    at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:361) ~[?:?]
    at ch.njol.skript.Skript$2.run(Skript.java:490) ~[?:?]
    at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:723) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
 
The version in installed and this error came:
Code:
[13:33:37 WARN]: [Skript] Task #18 for Skript v2.2-dev36 generated an exception
java.lang.NoSuchMethodError: ch.njol.skript.command.Commands.loadCommand(Lch/njol/skript/config/SectionNode;Z)Lch/njol/skript/command/ScriptCommand;
    at ch.njol.skript.ScriptLoader.loadScript(ScriptLoader.java:621) ~[?:?]
    at ch.njol.skript.ScriptLoader.lambda$1(ScriptLoader.java:389) ~[?:?]
    at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:401) ~[?:?]
    at ch.njol.skript.ScriptLoader.lambda$0(ScriptLoader.java:331) ~[?:?]
    at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:361) ~[?:?]
    at ch.njol.skript.Skript$2.run(Skript.java:490) ~[?:?]
    at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71) ~[spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
    at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:723) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-Spigot-db6de12-18fbb24]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
Try reinstalling Skript. Also try without SkQuery.
 
Very nice it works fine, but i have a question:
What's wrong with this code:

Code:
options:
    Prefix: &f[&3GunGame&f]

on skript load:
    broadcast "test"
    stop

function Scoreboard(player: player):
    wipe {_player}'s sidebar
    set name of sidebar of {_player} to "   &e•&6● &3&lGungame   "
    set score " " in sidebar of {_player} to 11
    set score "&3•&b● &f&lKills:" in sidebar of {_player} to 10
    set score "&e➜ &a&l%{stats::%{_player}'s uuid%::kills}%" in sidebar of {_player} to 9
    set score "  " in sidebar of {_player} to 8
    set score "&3•&b● &f&lTode:" in sidebar of {_player} to 7
    set score "&e➜ &c&l%{stats::%{_player}'s uuid%::deaths}%" in sidebar of {_player} to 6
    set score "   " in sidebar of {_player} to 5
    set score "&3•&b● &f&lSpieler:" in sidebar of {_player} to 4
    set score "&e➜ &e&l%number of all players%" in sidebar of {_player} to 3
    set score "    " in sidebar of {_player} to 2
    set score "&3•&b● &f&lSpielvariante:" in sidebar of {_player} to 1
    set score "&e➜ &c&lTeaming Verboten!" in sidebar of {_player} to 0

The Error:
Code:
[14:54:28 ERROR]: Can't understand this expression: {stats::%{_player}'s uuid%::kills} (gamegun.sk, line 13: set score "&e➜ &a&l%{stats::%{_player}'s uuid%::kills}%" in sidebar of {_player} to 9')
[14:54:28 ERROR]: Can't understand this expression: {stats::%{_player}'s uuid%::deaths} (gamegun.sk, line 16: set score "&e➜ &c&l%{stats::%{_player}'s uuid%::deaths}%" in sidebar of {_player} to 6')
 
Very nice it works fine, but i have a question:
What's wrong with this code:

Code:
options:
    Prefix: &f[&3GunGame&f]

on skript load:
    broadcast "test"
    stop

function Scoreboard(player: player):
    wipe {_player}'s sidebar
    set name of sidebar of {_player} to "   &e•&6● &3&lGungame   "
    set score " " in sidebar of {_player} to 11
    set score "&3•&b● &f&lKills:" in sidebar of {_player} to 10
    set score "&e➜ &a&l%{stats::%{_player}'s uuid%::kills}%" in sidebar of {_player} to 9
    set score "  " in sidebar of {_player} to 8
    set score "&3•&b● &f&lTode:" in sidebar of {_player} to 7
    set score "&e➜ &c&l%{stats::%{_player}'s uuid%::deaths}%" in sidebar of {_player} to 6
    set score "   " in sidebar of {_player} to 5
    set score "&3•&b● &f&lSpieler:" in sidebar of {_player} to 4
    set score "&e➜ &e&l%number of all players%" in sidebar of {_player} to 3
    set score "    " in sidebar of {_player} to 2
    set score "&3•&b● &f&lSpielvariante:" in sidebar of {_player} to 1
    set score "&e➜ &c&lTeaming Verboten!" in sidebar of {_player} to 0

The Error:
Code:
[14:54:28 ERROR]: Can't understand this expression: {stats::%{_player}'s uuid%::kills} (gamegun.sk, line 13: set score "&e➜ &a&l%{stats::%{_player}'s uuid%::kills}%" in sidebar of {_player} to 9')
[14:54:28 ERROR]: Can't understand this expression: {stats::%{_player}'s uuid%::deaths} (gamegun.sk, line 16: set score "&e➜ &c&l%{stats::%{_player}'s uuid%::deaths}%" in sidebar of {_player} to 6')
Technically nothing, but Skript's parser isn't that great, so for some reason it doesn't recognize that. You need to set a local variable to the UUID, then use that in the variable.
 
Nice!

Code:
function Scoreboard(player: player):
    wipe {_player}'s sidebar
    set {_uuid} to {_player}'s uuid
    set name of sidebar of {_player} to "   &e•&6● &3&lGungame   "
    set score " " in sidebar of {_player} to 11
    set score "&3•&b● &f&lKills:" in sidebar of {_player} to 10
    set score "&e➜ &a&l%{stats::%{_uuid}%::kills}%" in sidebar of {_player} to 9
    set score "  " in sidebar of {_player} to 8
    set score "&3•&b● &f&lTode:" in sidebar of {_player} to 7
    set score "&e➜ &c&l%{stats::%{_uuid}%::deaths}%" in sidebar of {_player} to 6
    set score "   " in sidebar of {_player} to 5
    set score "&3•&b● &f&lSpieler:" in sidebar of {_player} to 4
    set score "&e➜ &e&l%number of all players%" in sidebar of {_player} to 3
    set score "    " in sidebar of {_player} to 2
    set score "&3•&b● &f&lSpielvariante:" in sidebar of {_player} to 1
    set score "&e➜ &c&lTeaming Verboten!" in sidebar of {_player} to 0
 
Nice!

Code:
function Scoreboard(player: player):
    wipe {_player}'s sidebar
    set {_uuid} to {_player}'s uuid
    set name of sidebar of {_player} to "   &e•&6● &3&lGungame   "
    set score " " in sidebar of {_player} to 11
    set score "&3•&b● &f&lKills:" in sidebar of {_player} to 10
    set score "&e➜ &a&l%{stats::%{_uuid}%::kills}%" in sidebar of {_player} to 9
    set score "  " in sidebar of {_player} to 8
    set score "&3•&b● &f&lTode:" in sidebar of {_player} to 7
    set score "&e➜ &c&l%{stats::%{_uuid}%::deaths}%" in sidebar of {_player} to 6
    set score "   " in sidebar of {_player} to 5
    set score "&3•&b● &f&lSpieler:" in sidebar of {_player} to 4
    set score "&e➜ &e&l%number of all players%" in sidebar of {_player} to 3
    set score "    " in sidebar of {_player} to 2
    set score "&3•&b● &f&lSpielvariante:" in sidebar of {_player} to 1
    set score "&e➜ &c&lTeaming Verboten!" in sidebar of {_player} to 0
Oooh, that's what i was going to tell ya
 
  • Like
Reactions: Flynn_LG
Status
Not open for further replies.