CraftTweaker

CraftTweaker

151M Downloads

Error with associative arrays

Mattmn opened this issue ยท 3 comments

commented

Issue Description:

Buggy behavior using associative arrays of type double[double]

What happens:

throws an Operand stack underflow error when retrieving values from the associative array.

What you expected to happen:

receive a value of type double.

Script used:

https://pastebin.com/ues6K9R9

crafttweaker.log file:

https://pastebin.com/nVCLvz4K


Affected Versions:

  • Minecraft: 1.12.2
  • Forge: 14.23.5.2838
  • Crafttweaker: 2-1.12-4.1.20.564
  • 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://pastebin.com/nVCLvz4K

commented

Put the as double[double] on the side of the {}
So var arrDblDbl= {} as double[double];

commented

Can this be closed?

commented

Yes that fixed it, thanks. It's was just unexpected because placing the type in front of the array worked fine for other types, like var arrItemString as IItemStack[string] = {};