Skip to content

NullPointerException when parsing a single expression #994

@TheLimeGlass

Description

@TheLimeGlass

NullPointerException when parsing a single expression. I get this error with this code:

set {_synth::0} to 0
set {_synth::1} to 0.3
set {_synth::2} to 0.5
set {_synth::3} to 0.7
set {_synth::4} to 1
set {_synth::5} to 1.3
set {_synth::6} to 1.5
set {_synth::7} to 1.7
set {_synth::8} to 2
add 0.75 to {_testing::*}
add 2 to {_testing::*}
add 0.1 to {_testing::*}
loop {_testing::*}:
	loop integers between 0 and 2:
		loop integers between 0 and 9:
			set {_decimal} to "%loop-integer-1%.%loop-integer-2%" parsed as number
			loop {_synth::*}:
				if difference between loop-value-4 and {_decimal} < 0.2:
					broadcast "&a%loop-value-4% and %{_decimal}%"
				else:
					broadcast "&c%loop-value-4% and %{_decimal}%"

Error:

[22:15:21] [Server thread/ERROR]: #!#! 
[22:15:21] [Server thread/ERROR]: #!#! [Skript] Severe Error:
[22:15:21] [Server thread/ERROR]: #!#! Could not load NewProject.sk
[22:15:21] [Server thread/ERROR]: #!#! 
[22:15:21] [Server thread/ERROR]: #!#! Something went horribly wrong with Skript.
[22:15:21] [Server thread/ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[22:15:21] [Server thread/ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
[22:15:21] [Server thread/ERROR]: #!#! Here is full list of them:
[22:15:21] [Server thread/ERROR]: #!#! Skellett2 (https://forums.skunity.com/resources/skellett-the-addon-with-a-beast-name.24/) FunkySk SkQuery HolographicDisplaysAddon 
[22:15:21] [Server thread/ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
[22:15:21] [Server thread/ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[22:15:21] [Server thread/ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[22:15:21] [Server thread/ERROR]: #!#! In that case, you will be given instruction on how should you report it.
[22:15:21] [Server thread/ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[22:15:21] [Server thread/ERROR]: #!#! Only if the author tells you to do so, report it as Skript issue (url below)
[22:15:21] [Server thread/ERROR]: #!#! Issue tracker: https://github.com/bensku/Skript/issues (only if you know what you're doing!)
[22:15:21] [Server thread/ERROR]: #!#! 
[22:15:21] [Server thread/ERROR]: #!#! Stack trace:
[22:15:21] [Server thread/ERROR]: #!#! java.lang.NullPointerException
[22:15:21] [Server thread/ERROR]: #!#!     at java.lang.Class.isAssignableFrom(Native Method)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parseSingleExpr(SkriptParser.java:502)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parseExpression(SkriptParser.java:808)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1517)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1474)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:223)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:178)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Condition.parse(Condition.java:81)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:998)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Loop.<init>(Loop.java:66)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:955)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Loop.<init>(Loop.java:66)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:955)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Loop.<init>(Loop.java:66)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:955)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Loop.<init>(Loop.java:66)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:955)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerSection.<init>(TriggerSection.java:54)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Conditional.<init>(Conditional.java:44)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:1005)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerSection.<init>(TriggerSection.java:54)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.While.<init>(While.java:35)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:966)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerSection.<init>(TriggerSection.java:54)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Conditional.<init>(Conditional.java:44)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:1005)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerSection.<init>(TriggerSection.java:54)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Conditional.<init>(Conditional.java:44)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:1005)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.Commands.loadCommand(Commands.java:471)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadScript(ScriptLoader.java:571)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.lambda$1(ScriptLoader.java:347)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:359)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:392)
[22:15:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.SkriptCommand.onCommand(SkriptCommand.java:188)
[22:15:21] [Server thread/ERROR]: #!#!     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
[22:15:21] [Server thread/ERROR]: #!#!     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141)
[22:15:21] [Server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:651)
[22:15:21] [Server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchServerCommand(CraftServer.java:637)
[22:15:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_12_R1.DedicatedServer.aP(DedicatedServer.java:444)
[22:15:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:407)
[22:15:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
[22:15:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
[22:15:21] [Server thread/ERROR]: #!#!     at java.lang.Thread.run(Unknown Source)
[22:15:21] [Server thread/ERROR]: #!#! 
[22:15:21] [Server thread/ERROR]: #!#! Version Information:
[22:15:21] [Server thread/ERROR]: #!#!   Skript: 2.2-dev32b
[22:15:21] [Server thread/ERROR]: #!#!   Bukkit: 1.12.2-R0.1-SNAPSHOT
[22:15:21] [Server thread/ERROR]: #!#!   Minecraft: 1.12.2
[22:15:21] [Server thread/ERROR]: #!#!   Java: 1.8.0_151 (Java HotSpot(TM) 64-Bit Server VM 25.151-b12)
[22:15:21] [Server thread/ERROR]: #!#!   OS: Windows 10 amd64 10.0
[22:15:21] [Server thread/ERROR]: #!#! 
[22:15:21] [Server thread/ERROR]: #!#! Running CraftBukkit: false
[22:15:21] [Server thread/ERROR]: #!#! Running Spigot (or compatible): true
[22:15:21] [Server thread/ERROR]: #!#! Running Paper (or compatible): false
[22:15:21] [Server thread/ERROR]: #!#! 
[22:15:21] [Server thread/ERROR]: #!#! Current node: if difference between loop-value-4 and {_decimal} < 0.15: (NewProject.sk, line 95)
[22:15:21] [Server thread/ERROR]: #!#! Current item: null
[22:15:21] [Server thread/ERROR]: #!#! Thread: Server thread
[22:15:21] [Server thread/ERROR]: #!#! 
[22:15:21] [Server thread/ERROR]: #!#! Language: english
[22:15:21] [Server thread/ERROR]: #!#! Link parse mode: DISABLED
[22:15:21] [Server thread/ERROR]: #!#! 
[22:15:21] [Server thread/ERROR]: #!#! End of Error.
[22:15:21] [Server thread/ERROR]: #!#! 

I start getting all the errors when I start making scripts again lol

Metadata

Metadata

Assignees

No one assigned

    Labels

    completedThe issue has been fully resolved and the change will be in the next Skript update.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions