I don't play this game anymore (waiting for an update), so heads up - this is all untested. Would appreciate you coming back and confirming it works for people who come after you with the same error. If it doesn't, I'll keep trying to troubleshoot.
This fix involves modifying 3 game maps. I can't narrow down which one of these is causing the issue based on the error message alone, and they're all beta-related mission maps.
Code:
data\Map005.json
data\Map045.json
data\Map090.json
If you don't want to change all of them, it is VERY likely that it's probably Map 90, but I'd recommend just fixing it everywhere.
The fix is relatively simple. We're going to find every section that pulls a game variable into a script variable, and then ensure that it's an array, afterwards.
So, find any instance of ONE of these 4 lines (They don't appear as a block, check for each individual line):
JavaScript:
let currentArray = $gameVariables.value(62);
currentArray = $gameVariables.value(14);
currentArray = $gameVariables.value(15);
currentArray = $gameVariables.value(16);
And then insert this line AFTER
currentArray is defined.
JavaScript:
if (!Array.isArray(currentArray)) currentArray = [];
There is also another snag.
There are CHECKS being made directly to these GAME variables, which are conditional based on length. Because these variables are not always arrays, or are undefined, the condition is LIKELY evaluating to FALSE.
I can't fix this, however, because even if I initialize it AS an array, the conditional would still be false because the length would be less than whatever it's checking.
It's possible this is an intended feature, I don't know.
NOTE: I am going to upload the map files that I edited, with TWO CAVEATS: I have not tested these files, and it's possible they contain edits I did for other troubleshooting. I don't THINK previous troubleshooting would have touched these maps directly, and even if they did, I'm pretty sure they would just be hidden improvements, but the warning is there.
You must be registered to see the links
EDIT: Just to clarify how I made these changes, in case it's confusing:
1. Open each file in Notepad++.exe (or similar tool which has Find/Replace functionality.
2. Find:
let currentArray = $gameVariables.value(62);
3. Replace:
let currentArray = $gameVariables.value(62);if (!Array.isArray(currentArray)) currentArray = [];
4. Repeat for the other 3 lines.
It should be relatively simple edit. You don't even need to analyze the files, really.
As a sanity check, when I did my edits
Map005.json had 2 lines modified for each variable, and the other maps (
Map045.json,
Map090.json) each had just 1 for each variable.