
Checking if string has a substring with in operator gives Bad type on operand stack
Guinaro opened this issue ยท 1 comments
Issue Description:
I cannot use the IN operator on strings:
Results in a Bad type on operand stack Error
What happens:
[INITIALIZATION][CLIENT][ERROR] [crafttweaker]: Error executing {[0:crafttweaker]: test2.zs}: Bad type on operand stack
Exception Details:
Location:
Test2.script()V @19: invokestatic
Reason:
Type integer (current frame, stack[1]) is not assignable to 'java/lang/String'
What you expected to happen:
Being able to use in on strings.
See https://crafttweaker.readthedocs.io/en/latest/#Vanilla/Variable_Types/Basic_Variables_Functions/
Script used (Please Pastebin or gist your script, posting an unpasted or ungist'd script will automatically close this issue):
https://gist.github.com/Guinaro/ba2329a3806fc6abc952e7c5efcb42c5
Minetweaker.log file (Please Pastebin or gist your file, posting an unpasted or ungist'd file will automatically close this issue):
https://gist.github.com/Guinaro/fa3376fe1478e7fe0d2933aad6230940
Affected Versions (Do not use "latest"):
- Minecraft: 1.12.2
- Forge: 14.23.2.2618
- Crafttweaker: 1.12-4.1.5
Your most recent log file where the issue was present:
https://gist.github.com/Guinaro/a81380f6bb9215e2ff66e24508928936