UndertaleModTool icon indicating copy to clipboard operation
UndertaleModTool copied to clipboard

GML Compiler causing Functions to sometimes compile incorrectly leading to them not be called.

Open Miepee opened this issue 3 years ago • 0 comments

Using a mod of deltranslate (see heresome functions compile incorrectly when using the (de)compiler. Using the (dis)assembler works without issues. Functions that *sometimes* cause these issues are:button1_p, button2_p, up_p, down_p, left_p, right_p, stringsetloc, ossafe_file(each of them), snd_play, instance_create and sound_free_al`. Might be more and only sometimes. Replication steps:

  • Open the data.win in UTMT
  • Open gml_Object_obj_CHAPTER_SELECT_Draw_0
  • look at the disassembly tab, scroll down a little and notice how the functions are correct image
  • Go to the Decompiler tab, and do a minute change like changing if (!audio_group_is_loaded(1)) to if (!audio_group_is_loaded(0))
  • Go to the disassembly tab, scroll down a little and notice how the functions are wrong: image

The game will now not call these broken functions anymore:

Something further: while in the above example it's possible to see stringsetloc breaking, going to gml_Obejct_obj_tensionbar_Draw_0 and performing the same operations causes the functions to not break.

Miepee avatar Apr 30 '22 18:04 Miepee