CraftTweaker

CraftTweaker

151M Downloads

[1.15] Misleading Error Message

NielsPilgaard opened this issue ยท 3 comments

commented

What happens:

I made a script and forgot to cast a value that should have been a float - The issue is the error message that I received, it really threw me off: com.google.gson.JsonSyntaxException: Expected count to be a Int, was "1"

What you expected to happen:

I hoped to get an error message telling me what went wrong.

Script used (Please Pastebin or gist your script, posting an unpasted or ungist'd script will automatically close this issue):

https://gist.github.com/NillerMedDild/c4f5e6d3aa38fbf0b7ad163ca588a25c

crafttweaker.log file (Please Pastebin or gist your file, posting an unpasted or ungist'd file will automatically close this issue):

https://gist.github.com/NillerMedDild/343c22eb724e644427211b741961e1ff


Affected Versions (Do not use "latest"):

  • Minecraft: 1.15.2
  • Forge: 1.15.2-31.2.9
  • Crafttweaker: CraftTweaker-1.15.2-6.0.0.29
  • Using a server: No
  • If yes, does the client have the exact same scripts?

Your most recent log file where the issue was present:

https://gist.github.com/NillerMedDild/2ec59208c77ffeee66f569a4f3ba950c

commented

Also side note, this is why I still push for people to have native CraftTweaker support, because it doesn't lead to confusion like this where I can't control anything about the situation (I have no idea what types are expected, so I can't even warn users)

commented

Nothing we can do about that, it is a GSON error from incorrect JSON.

commented

Alright, thanks.