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

Skript NullPointerException when parsing with syntax

Discussion in 'Skript' started by TPGamesNL, Apr 26, 2018.

Tags:
Thread Status:
Not open for further replies.
  1. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    Skript Version: 2.2-dev35
    Skript Author: Bensku
    Minecraft Version: Spigot 1.12.2-R0.1-SNAPSHOT
    ---
    Full Code:
    Code (Skript):
    1. command /ptest <text>:
    2.     trigger:
    3.         set {_t::*} to arg-1 parsed as "[%number%]x^2[ ][%text%[ ]%number%x][ ][%text%[ ]%number%][ ]=[ ]0"
    4.         message "%{_t::*}%"
    Errors on Reload:
    None

    Console Errors:
    Code (Skript):
    1. [12:05:42 INFO]: TPGamesNL [ecf95bdd-5d30-4ddb-a3ec-f491f7cc1f34]: /ptest x^2 +2x+5= 0
    2. [12:05:42 ERROR]: #!#!
    3. [12:05:42 ERROR]: #!#! [Skript] Severe Error:
    4. [12:05:42 ERROR]: #!#!
    5. [12:05:42 ERROR]: #!#! Something went horribly wrong with Skript.
    6. [12:05:42 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
    7. [12:05:42 ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
    8. [12:05:42 ERROR]: #!#! Here is full list of them:
    9. [12:05:42 ERROR]: #!#! skRayFall (http://sk.rayfall.net/) Skuared skUtilities (https://tim740.github.io/) MundoSK (https://forums.skunity.com/resources/mundosk.69/) Skellett (https://forums.skunity.com/resources/skellett-the-addon-with-a-beast-name.24/) SkQuery
    10. [12:05:42 ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
    11. [12:05:42 ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
    12. [12:05:42 ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
    13. [12:05:42 ERROR]: #!#! In that case, you will be given instruction on how should you report it.
    14. [12:05:42 ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
    15. [12:05:42 ERROR]: #!#! Only if the author tells you to do so, report it as Skript issue (url below)
    16. [12:05:42 ERROR]: #!#! Issue tracker: https://github.com/bensku/Skript/issues (only if you know what you're doing!)
    17. [12:05:42 ERROR]: #!#!
    18. [12:05:42 ERROR]: #!#! Stack trace:
    19. [12:05:42 ERROR]: #!#! java.lang.NullPointerException
    20. [12:05:42 ERROR]: #!#!     at ch.njol.skript.expressions.ExprParse.get(ExprParse.java:160)
    21. [12:05:42 ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:104)
    22. [12:05:42 ERROR]: #!#!     at ch.njol.skript.effects.EffChange.execute(EffChange.java:268)
    23. [12:05:42 ERROR]: #!#!     at ch.njol.skript.lang.Effect.run(Effect.java:52)
    24. [12:05:42 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
    25. [12:05:42 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
    26. [12:05:42 ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:55)
    27. [12:05:42 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:279)
    28. [12:05:42 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:236)
    29. [12:05:42 ERROR]: #!#!     at ch.njol.skript.command.Commands.handleCommand(Commands.java:255)
    30. [12:05:42 ERROR]: #!#!     at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:170)
    31. [12:05:42 ERROR]: #!#!     at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
    32. [12:05:42 ERROR]: #!#!     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    33. [12:05:42 ERROR]: #!#!     at java.lang.reflect.Method.invoke(Unknown Source)
    34. [12:05:42 ERROR]: #!#!     at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302)
    35. [12:05:42 ERROR]: #!#!     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    36. [12:05:42 ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500)
    37. [12:05:42 ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485)
    38. [12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1389)
    39. [12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1232)
    40. [12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45)
    41. [12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:1)
    42. [12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13)
    43. [12:05:42 ERROR]: #!#!     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    44. [12:05:42 ERROR]: #!#!     at java.util.concurrent.FutureTask.run(Unknown Source)
    45. [12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46)
    46. [12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:748)
    47. [12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)
    48. [12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
    49. [12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
    50. [12:05:42 ERROR]: #!#!     at java.lang.Thread.run(Unknown Source)
    51. [12:05:42 ERROR]: #!#!
    52. [12:05:42 ERROR]: #!#! Version Information:
    53. [12:05:42 ERROR]: #!#!   Skript: 2.2-dev35 (latest)
    54. [12:05:42 ERROR]: #!#!   Bukkit: 1.12.2-R0.1-SNAPSHOT
    55. [12:05:42 ERROR]: #!#!   Minecraft: 1.12.2
    56. [12:05:42 ERROR]: #!#!   Java: 1.8.0_171 (Java HotSpot(TM) 64-Bit Server VM 25.171-b11)
    57. [12:05:42 ERROR]: #!#!   OS: Windows 10 amd64 10.0
    58. [12:05:42 ERROR]: #!#!
    59. [12:05:42 ERROR]: #!#! Server platform: Spigot
    60. [12:05:42 ERROR]: #!#!
    61. [12:05:42 ERROR]: #!#! Current node: null
    62. [12:05:42 ERROR]: #!#! Current item: set {_t::*}(as java.lang.Object) to the 1st argument parsed as [%number%]x^2[ ][%string%[ ]%number%x][ ][%string%[ ]%number%][ ]=[ ]0
    63. [12:05:42 ERROR]: #!#! Current trigger: command /ptest (simple event) (m.sk, line -1)
    64. [12:05:42 ERROR]: #!#!
    65. [12:05:42 ERROR]: #!#! Thread: Server thread
    66. [12:05:42 ERROR]: #!#!
    67. [12:05:42 ERROR]: #!#! Language: english
    68. [12:05:42 ERROR]: #!#! Link parse mode: DISABLED
    69. [12:05:42 ERROR]: #!#!
    70. [12:05:42 ERROR]: #!#! End of Error.
    71. [12:05:42 ERROR]: #!#!
    Addons using (including versions):
    MundoSK (1.8.5), Skellett (1.9.6b), skUtilities (0.9.0), skRayFall (1.9.12), SkQuery (3.6.0-Lime), Skuared (skript-math, 1.1)

    Troubleshooting:

    Have you tried searching the docs? Yes
    Have you tried searching the forums? Yes
    What other methods have you tried to fix it? I tried limiting the syntax to
    Code (Skript):
    1. [%number%]x^2[ ]=[ ]0
    but that didn't work either when I put in
    Code (Skript):
    1. x^2 = 0
     
  2. Normalguy

    Normalguy Well-Known Member

    Joined:
    Apr 19, 2018
    Messages:
    98
    Likes Received:
    0
    Just removed the plugin. I had same error too.
     
  3. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    Did you remove Skript because you found a error, or did you remove your script?
     
  4. Normalguy

    Normalguy Well-Known Member

    Joined:
    Apr 19, 2018
    Messages:
    98
    Likes Received:
    0
    No the addon
    --- Double Post Merged, Apr 26, 2018, Original Post Date: Apr 26, 2018 ---
    After end of the error, did skript says successfully loaded * scripts?
    If yes, addon is bad
     
  5. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    Well the point is that this is just Bensku's Skript, the expression isn't from an addon. Also I don't get any errors on reload, I get an error when I execute the command.
     
  6. Normalguy

    Normalguy Well-Known Member

    Joined:
    Apr 19, 2018
    Messages:
    98
    Likes Received:
    0
    Oh you got version 2.2. Maybe you can try other versions.
     
  7. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    Okay sure, but I'm using Bensku's latest version, so this shouldnt happen (I think)
     
  8. Snow-Pyon

    Moderator Resource Staff

    Joined:
    Jan 25, 2017
    Messages:
    1,234
    Likes Received:
    172
    Medals:
    It shouldn't actually happen, but it does. Fill an issue about it and I'll check it out later.

    Also, it is because you can't (currently) have optional types in the parse expression.


    Side note: make sure you're using the latest version of Skript when reporting the error.
     
  9. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    So where should I fill an issue about it? On the github page?
    Yeah I was using the latest version
    Do you have any idea if and when they are going to add this?
     
  10. Snow-Pyon

    Moderator Resource Staff

    Joined:
    Jan 25, 2017
    Messages:
    1,234
    Likes Received:
    172
    Medals:
    Yes, on the Skript's issue tracker. And yes, it is gonna be added at some point, it just depends how easily we can implement it.
     
  11. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
Thread Status:
Not open for further replies.
Loading...