Multiple variables in for loop initializer do not work
omgimanerd opened this issue · 0 comments
Minecraft: 1.20.1
Forge: 47.3.0
Rhino: 2001.2.2-build.18
Updated Rhino to 2001.2.2-build.18 and it gave a syntax error for this loop:
for (
let fixPointer = pointer + 1, i = 1;
fixPointer < k;
fixPointer++, i++
) {
startup.log
[21:26:28] [ERROR] ! fixPointer < k#144: missing ; after for-loop initializer
[21:26:28] [ERROR] ! …rhino.EvaluatorException: missing ; after for-loop initializer (startup_scripts:util/math.js#144)
[21:26:28] [ERROR] ! at …rhino.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:67)
[21:26:28] [ERROR] ! at …rhino.DefaultErrorReporter.error(DefaultErrorReporter.java:58)
Seems like it doesn't like having multiple variable declarations in the for loop initializer.