itch.io Spring Selects Series A
On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMLive.gml

Livecoding for GameMaker: Studio / GameMaker Studio 2 · By YellowAfterlife

[Solved] Error on GMS2 when running Debug mode

A topic by bitlather created Dec 07, 2017 Views: 1,265 Replies: 2
Viewing posts 1 to 3
(3 edits)

GM Live is really cool. I've been playing with it today and am impressed.

I noticed that when I run my project in GMS2's Debug Mode, I get this error:

___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object obj_gmlive:
global variable name 'g_live_log_script' index (100638) not set before reading it.
 at gml_Script_live_log (line 4) -        script_execute(g_live_log_script,"[live]["+date_time_string(date_current_datetime())+"] "+l_s);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_live_log (line 4)
called from - gml_Script_live_init (line 6) -        live_log("Initializing...");
called from - gml_Object_obj_gmlive_Create_0 (line 7) - live_init(1, "<a href="<a href="<a href="http://localhost:5100">http://localhost:5100</a>"><a href="http://localhost:5100</a>">http://localhost:5100</a></a>"><a href="<a href="http://localhost:5100</a>">http://localhost:5100</a></a>"><a href="http://localhost:5100</a></a>">http://localhost:5100</a></a></a>", "");

This is with and without GMLive running. Running my game normally works fine.

Removing 

instance_create(0, 0, obj_gmlive);

makes it work in Debug mode.

Developer

There is currently a bit of a bug with both GMS1 and GMS2 which causes the game to give up trying to initialize extensions if they are past certain size. Adding

if (debug_mode) live_preinit();

prior to live_init call fixes the issue.

Disabling GMLive (via live_enabled macro) while debugging (assuming that you don't want both at once) is another option.

Confirmed - this gets rid of the error:

if (debug_mode) live_preinit();    // <===
instance_create(0, 0, obj_gmlive);