UnderminersTeam / UndertaleModTool

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

Code compiler sometimes causes some variables to be "unreference" #713

Open FriskTheFallenHuman opened 2 years ago

FriskTheFallenHuman commented 2 years ago

Has the title say while i was merging a modified obj_base_writter_draw_0 and compile the code entry and saved it, and launched the game i was immediately welcome with a unreferenced variable error, i checked the variable that the error gives and the variable is infact reference here's a code sniped of the code:

        var display_scale = (surface_get_width(application_surface) / __view_get(2, view_current))
        var finalx = (round(((letterx + offsetx) * display_scale)) / display_scale)
        var finaly = (round(((myy + offsety) * display_scale)) / display_scale)
        var scalex = (htextscale * halfscale)
        var scaley = (vtextscale * halfscale)

The variable in question is var display_scale = (surface_get_width(application_surface) / __view_get(2, view_current))

here's the full code entry: gml_Object_obj_base_writer_Draw_0

Jacky720 commented 9 months ago

Can you post more context on the exact error message from the game?