CraftTweaker

CraftTweaker

151M Downloads

Compiling scripts can cause a NPE

Charnuz opened this issue ยท 5 comments

commented

Issue Description:

This could be a ZenScript issue, but it might be an issue with how scripts are loaded. Using a ZenSetter on an event passed to a function causes it, but not the ZenGetter.

What happens:

Script throws a NPE on execution and fails, but cannot be caused by the script. Tested with only CT installed too.

Script
Log


Affected Versions (Do not use "latest"):

  • Minecraft: 1.12.2
  • Forge: 14.23.5.2854
  • Crafttweaker: 1.12-4.1.20.586
  • Using a server: No
commented

There is not a ZenSetter of maxHealth

commented

As friendly said, there is no zensetter for maxHealth

commented

Shouldn't it have the 'No such member' error instead of this though?

commented

@kindlich can give more insight, but the member exists (in the form of a getter, not a setter), just not for what you want to use it for

commented

Ah I see, the NPE does make debugging harder since it doesn't have any relevant info