1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Why doesn't work why function?

Discussion in 'Skript' started by Flynn_LG, Dec 28, 2019.

Thread Status:
Not open for further replies.
  1. Flynn_LG

    Flynn_LG Member

    Joined:
    Nov 4, 2019
    Messages:
    38
    Likes Received:
    1
    The Version of Skript is the latest!
     
  2. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    No 2.2 is not the latest
     
  3. Flynn_LG

    Flynn_LG Member

    Joined:
    Nov 4, 2019
    Messages:
    38
    Likes Received:
    1
    uufff sorry xD
    --- Double Post Merged, Dec 28, 2019, Original Post Date: Dec 28, 2019 ---
    But i can't find a new version of the Skript plugin for Minecraft Spigot 1.8.9
     
  4. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
  5. Flynn_LG

    Flynn_LG Member

    Joined:
    Nov 4, 2019
    Messages:
    38
    Likes Received:
    1
    The version in installed and this error came:
    Code (Text):
    1. [13:33:37 WARN]: [Skript] Task #18 for Skript v2.2-dev36 generated an exception
    2. java.lang.NoSuchMethodError: ch.njol.skript.command.Commands.loadCommand(Lch/njol/skript/config/SectionNode;Z)Lch/njol/skript/command/ScriptCommand;
    3.     at ch.njol.skript.ScriptLoader.loadScript(ScriptLoader.java:621) ~[?:?]
    4.     at ch.njol.skript.ScriptLoader.lambda$1(ScriptLoader.java:389) ~[?:?]
    5.     at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:401) ~[?:?]
    6.     at ch.njol.skript.ScriptLoader.lambda$0(ScriptLoader.java:331) ~[?:?]
    7.     at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:361) ~[?:?]
    8.     at ch.njol.skript.Skript$2.run(Skript.java:490) ~[?:?]
    9.     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]
    10.     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]
    11.     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]
    12.     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]
    13.     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]
    14.     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]
    15.     at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
     
  6. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    Try reinstalling Skript. Also try without SkQuery.
     
  7. Flynn_LG

    Flynn_LG Member

    Joined:
    Nov 4, 2019
    Messages:
    38
    Likes Received:
    1
    Very nice it works fine, but i have a question:
    What's wrong with this code:

    Code (Text):
    1. options:
    2.     Prefix: &f[&3GunGame&f]
    3.  
    4. on skript load:
    5.     broadcast "test"
    6.     stop
    7.  
    8. function Scoreboard(player: player):
    9.     wipe {_player}'s sidebar
    10.     set name of sidebar of {_player} to "   &e•&6● &3&lGungame   "
    11.     set score " " in sidebar of {_player} to 11
    12.     set score "&3•&b● &f&lKills:" in sidebar of {_player} to 10
    13.     set score "&e➜ &a&l%{stats::%{_player}'s uuid%::kills}%" in sidebar of {_player} to 9
    14.     set score "  " in sidebar of {_player} to 8
    15.     set score "&3•&b● &f&lTode:" in sidebar of {_player} to 7
    16.     set score "&e➜ &c&l%{stats::%{_player}'s uuid%::deaths}%" in sidebar of {_player} to 6
    17.     set score "   " in sidebar of {_player} to 5
    18.     set score "&3•&b● &f&lSpieler:" in sidebar of {_player} to 4
    19.     set score "&e➜ &e&l%number of all players%" in sidebar of {_player} to 3
    20.     set score "    " in sidebar of {_player} to 2
    21.     set score "&3•&b● &f&lSpielvariante:" in sidebar of {_player} to 1
    22.     set score "&e➜ &c&lTeaming Verboten!" in sidebar of {_player} to 0
    The Error:
    Code (Text):
    1. [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')
    2. [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')
    3.  
     
  8. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    107
    Medals:
    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.
     
  9. Flynn_LG

    Flynn_LG Member

    Joined:
    Nov 4, 2019
    Messages:
    38
    Likes Received:
    1
    Nice!

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

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    Oooh, that's what i was going to tell ya
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...