UndertaleModTool
UndertaleModTool copied to clipboard
UML compiler missing static keyword
Describe the bug
Attempting to make changes to the decompiled gml_GlobalScript_scrScore code file in the latest Void War release throws the following error:
---------------------------
Compiler error
---------------------------
Errors parsing code when trying to compile modified "gml_GlobalScript_scrScore":
Expected assignment operator around line 440, column 16 (getAllCrewData).
Expected assignment operator around line 473, column 16 (getShipData).
Expected assignment operator around line 477, column 20 (getSysData).
Expected assignment operator around line 499, column 20 (getWeapons).
Unexpected token in expression around line 520, column 13.
Malformed assignment statement.
Expected assignment operator around line 522, ...
---------------------------
OK
---------------------------
The code referenced by the error: generate_score_data.txt
Reproducing steps
Fix struct keyword issue in #1916 as specified in this comment, then attempt to make modifications to the code and recompile.
Setup Details
- Latest from
underanalyzerbranch (8c5462c) - Windows 10
- Void War Alpha Patch #2 (https://tundra-interactive.itch.io/void-war)
After messing with a few more functions, it seems like there may be something wrong with the way the compiler handles the static keyword, in particular when declaring a static variable and assigning a function to it
function someOuterFunction(argument0)
{
static someInnerFunction = function(argument0)
{
return argument0;
};
return argument0;
}
Confirming that the compiler is missing implementation for the static keyword
Should be fixed as part of https://github.com/UnderminersTeam/UndertaleModTool/pull/2056.
This should now be fixed on the latest bleeding edge release. I'll close this issue for now, but feel free to re-open it if it's still broken.