Skript is a Spigot plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
EntryContainer methods don't check if the current events of the parser instance are set, causing NullPointerException if used in the walk() method
Expected Behavior
The exception shouldn't be thrown
Steps to Reproduce
Use any EntryContainer method inside the walk method
Example code:
https://hastebin.skyra.pw/obiheruroh.pgsql - remove line 54 to reproduce it
(this is not the final product, the syntax doesn't work properly yet and lots of stuff was changed, this is just an example)
function add(first: int, second: int, message: string) :: string:
return "%{_first}% + %{_second}% %{_message}% %{_first} + {_second}%"
function test():
execute function add and store it in {var}:
first: 1
second: 2
message: "a"
broadcast {var}
You're trying to parse expressions at runtime where the parser instance isn't active. You need to use the entry container at parse time instead. This is intended, there's nothing wrong with the behavior
Skript/Server Version
Bug Description
EntryContainer methods don't check if the current events of the parser instance are set, causing NullPointerException if used in the walk() method
Expected Behavior
The exception shouldn't be thrown
Steps to Reproduce
Use any EntryContainer method inside the walk method Example code: https://hastebin.skyra.pw/obiheruroh.pgsql - remove line 54 to reproduce it (this is not the final product, the syntax doesn't work properly yet and lots of stuff was changed, this is just an example)
Errors or Screenshots
https://hastebin.skyra.pw/ehabupasop.md
Other
No response
Agreement