[ZenScript parsing?] `double` parameter desyncs references to other function parameters
Robijnvogel opened this issue · 2 comments
Issue Description:
A custom function that has a double
parameter that is not the last/right-most parameter of the function and that, in its body, refers to the (/a, but this is unconfirmed) that comes after it/is to its right, will consistently cause an error.
Looking at the error in the CT log, I think that this is caused by the double parameter being split into two values, before and after the decimal separator, during parsing of the script, causing the double to take up two spots in the parameter array, making all references to parameters after the double
refer to the parameter before them, starting with the second part of the double (double2
).
What happens:
The script errors.
What you expected to happen:
The script should parse and run perfectly. ¯_(ツ)_/¯
Script used:
function brokenFunction(breakingParam as double, brokenParam as bool) {
if (brokenParam) {
//do anything
}
}
brokenFunction(0.0, true);
crafttweaker.log file:
https://paste.dimdev.org/urusevudek.md
Affected Versions (Do not use "latest"):
- Minecraft: 1.12.2
- Forge: 2747
- Crafttweaker: 1.12-4.1.11
- Using a server: Nope
Yeah, it was fixed in one of the dev versions you people shared via your Discord.
Want me to look up the exact commit(s) for you? 😉