UndertaleModTool icon indicating copy to clipboard operation
UndertaleModTool copied to clipboard

Code compiler sometimes causes some variables to be "unreference"

Open FriskTheFallenHuman opened this issue 3 years ago • 1 comments

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

FriskTheFallenHuman avatar Dec 23 '21 21:12 FriskTheFallenHuman

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

Jacky720 avatar Feb 19 '24 23:02 Jacky720