UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other GameMaker games!)
GNU General Public License v3.0
1.19k stars 233 forks source link

UML compiler doesn't support calling variables as functions #1920

Open ChronoVortex opened 2 months ago

ChronoVortex commented 2 months ago

Describe the bug

Attempting to make changes to a source file that calls a variable as a function causes the compiler to fail:

---------------------------
Compiler error
---------------------------
Error parsing code when trying to compile modified "gml_Object_oInitGlobals_Create_0":

Expected token kind ProcVariable, got ProcFunction around line 21, column 8 (release_disableFlags).

---------------------------
OK   
---------------------------

The code referenced by the error:

global.release_disableFlags();

Reproducing steps

Compile a GameMaker project that calls a variable as a function, decompile it with UA, then attempt to recompile using UML.

Setup Details

  1. Latest from underanalyzer branch (8c5462c)
  2. Windows 10
  3. Void War Alpha Patch #​2 (https://tundra-interactive.itch.io/void-war)