Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

[Solved] GMLive doesn't recognize draw_get_font()

A topic by drindilica created Jun 25, 2019 Views: 438 Replies: 1
Viewing posts 1 to 2
(2 edits)

Hi!

I have this in a Draw-Event:

var _fontBefore = draw_get_font();

When starting the game, GMLive doesn't complain about it, but as soon as I change something in that Event and save it, GMLive cannot reload that Draw- Event anymore and gives this error:

[live][11:38:03] Error in obj_test_powerups_cont:Draw_0:
[live][11:38:03] obj_test_powerups_cont:Draw_0[L7,c19] `draw_get_font` is not a function or script

This is the code at the top of that Draw-Event:

/// @description  Draw test stuff
if (live_enabled) {
    if (live_call()) { return live_result; }
}

var _colorBefore = draw_get_colour();
var _fontBefore = draw_get_font();

...

...

Developer

It's this thing - GM lacks support for version-specific extension code so I cannot introduce new functions right away.

The wrapper script for draw_get_font would be just

/// scr_draw_get_font();
return draw_get_font();