Skript NullPointerException when parsing with syntax

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

TPGamesNL

Staff member
Moderator
Supporter
Addon Developer
Dev Programme
Jan 20, 2018
1,501
108
63
20
Skript Version: 2.2-dev35
Skript Author: Bensku
Minecraft Version: Spigot 1.12.2-R0.1-SNAPSHOT
---
Full Code:
code_language.skript:
command /ptest <text>:
    trigger:
        set {_t::*} to arg-1 parsed as "[%number%]x^2[ ][%text%[ ]%number%x][ ][%text%[ ]%number%][ ]=[ ]0"
        message "%{_t::*}%"

Errors on Reload:
None

Console Errors:
code_language.skript:
[12:05:42 INFO]: TPGamesNL [ecf95bdd-5d30-4ddb-a3ec-f491f7cc1f34]: /ptest x^2 +2x+5= 0
[12:05:42 ERROR]: #!#!
[12:05:42 ERROR]: #!#! [Skript] Severe Error:
[12:05:42 ERROR]: #!#!
[12:05:42 ERROR]: #!#! Something went horribly wrong with Skript.
[12:05:42 ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[12:05:42 ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
[12:05:42 ERROR]: #!#! Here is full list of them:
[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
[12:05:42 ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
[12:05:42 ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[12:05:42 ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[12:05:42 ERROR]: #!#! In that case, you will be given instruction on how should you report it.
[12:05:42 ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[12:05:42 ERROR]: #!#! Only if the author tells you to do so, report it as Skript issue (url below)
[12:05:42 ERROR]: #!#! Issue tracker: https://github.com/bensku/Skript/issues (only if you know what you're doing!)
[12:05:42 ERROR]: #!#!
[12:05:42 ERROR]: #!#! Stack trace:
[12:05:42 ERROR]: #!#! java.lang.NullPointerException
[12:05:42 ERROR]: #!#!     at ch.njol.skript.expressions.ExprParse.get(ExprParse.java:160)
[12:05:42 ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:104)
[12:05:42 ERROR]: #!#!     at ch.njol.skript.effects.EffChange.execute(EffChange.java:268)
[12:05:42 ERROR]: #!#!     at ch.njol.skript.lang.Effect.run(Effect.java:52)
[12:05:42 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
[12:05:42 ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
[12:05:42 ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:55)
[12:05:42 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:279)
[12:05:42 ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:236)
[12:05:42 ERROR]: #!#!     at ch.njol.skript.command.Commands.handleCommand(Commands.java:255)
[12:05:42 ERROR]: #!#!     at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:170)
[12:05:42 ERROR]: #!#!     at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
[12:05:42 ERROR]: #!#!     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[12:05:42 ERROR]: #!#!     at java.lang.reflect.Method.invoke(Unknown Source)
[12:05:42 ERROR]: #!#!     at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302)
[12:05:42 ERROR]: #!#!     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[12:05:42 ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500)
[12:05:42 ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485)
[12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1389)
[12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1232)
[12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45)
[12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:1)
[12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13)
[12:05:42 ERROR]: #!#!     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[12:05:42 ERROR]: #!#!     at java.util.concurrent.FutureTask.run(Unknown Source)
[12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46)
[12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:748)
[12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)
[12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
[12:05:42 ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
[12:05:42 ERROR]: #!#!     at java.lang.Thread.run(Unknown Source)
[12:05:42 ERROR]: #!#!
[12:05:42 ERROR]: #!#! Version Information:
[12:05:42 ERROR]: #!#!   Skript: 2.2-dev35 (latest)
[12:05:42 ERROR]: #!#!   Bukkit: 1.12.2-R0.1-SNAPSHOT
[12:05:42 ERROR]: #!#!   Minecraft: 1.12.2
[12:05:42 ERROR]: #!#!   Java: 1.8.0_171 (Java HotSpot(TM) 64-Bit Server VM 25.171-b11)
[12:05:42 ERROR]: #!#!   OS: Windows 10 amd64 10.0
[12:05:42 ERROR]: #!#!
[12:05:42 ERROR]: #!#! Server platform: Spigot
[12:05:42 ERROR]: #!#!
[12:05:42 ERROR]: #!#! Current node: null
[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
[12:05:42 ERROR]: #!#! Current trigger: command /ptest (simple event) (m.sk, line -1)
[12:05:42 ERROR]: #!#!
[12:05:42 ERROR]: #!#! Thread: Server thread
[12:05:42 ERROR]: #!#!
[12:05:42 ERROR]: #!#! Language: english
[12:05:42 ERROR]: #!#! Link parse mode: DISABLED
[12:05:42 ERROR]: #!#!
[12:05:42 ERROR]: #!#! End of Error.
[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_language.skript:
[%number%]x^2[ ]=[ ]0
but that didn't work either when I put in
code_language.skript:
x^2 = 0
 
Did you remove Skript because you found a error, or did you remove your script?
 
No the addon
[doublepost=1524781210,1524781141][/doublepost]After end of the error, did skript says successfully loaded * scripts?
If yes, addon is bad
 
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.
 
Okay sure, but I'm using Bensku's latest version, so this shouldnt happen (I think)
 
Okay sure, but I'm using Bensku's latest version, so this shouldnt happen (I think)
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.
 
Status
Not open for further replies.