Skip to main content

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

[Solved] Running in HTML5

A topic by shredmer created Oct 16, 2019 Views: 448 Replies: 6
Viewing posts 1 to 5
(1 edit)

Hello,

I would like to know if I can use GMLive while debugging in HTML5? The games I make are web based and unfortunately if I build a project for Windows native and then try to export a build for HTML5, I will be hit with all sorts of issues. I have ran into this in the past and so now I prefer to just build for HTML5 from the start with any new project.

When attempting to run this in an HTML5 build for Chrome I end up with the following errors:

Hey Shredmer, not sure what is going on or how you are getting that error but...
I was also trying to get this working in HTML5, which I figured it was possible because of the live demo online.

I hit the issue that whenever I connect to the gm-live server it seems to break inside the extension code:
```

[live][16:11:20] Ready!
qstLiveHTML5.js?NGPYB=1502922978:54056 Error: array_get() : argument 0 must be a 1D array
--------------------------------------------------------------------
function _pe("array_get() : argument 0 must be a 1D array")
function array_get([unknown], 2)
function gml_Script_gml_builder_build_line([instance], [instance], [unknown])
function gml_Script_gml_builder_build_outer([instance], [instance], [unknown], "obj_gmlive:Draw_0")
function gml_Script_gml_builder_build_loop([instance], [instance], [unknown], "obj_gmlive:Draw_0")
function gml_Script_gml_builder_create([instance], [instance], [unknown])
function gml_Script_gml_program_create([instance], [instance], [unknown])
function gml_Script_live_update_script_impl([instance], [instance], "obj_gmlive:Draw_0", "gml_Object_obj_gmlive_Draw_0", "/// @description An example
if (live_call()) return live_result;
/*
draw_set_color(c_blue);
draw_text(5, 5, "Try changing something here and saving!");
```
The game doesn't want to run or show anything when started while the server is running, but if you open the debug tools before starting the server when it all stops this is what I get.

Any ideas?

Developer (1 edit) (+1)

Hello! The "unexpected token 'var'" part is a bug with GMS2 compiler.I'm currently working on getting an updated version of GMLive out as the recent GMS2 versions had been changing/fixing/breaking things a lot.

Developer(+1)

1.0.22 (now released) fixes this, but you'll need to update to runtime 2.2.4.372 (where they fixed the bug with for-loop misplacing a ";")

(1 edit)

w00t, it's working!
Fantastic quickness on the response and fix YellowAfterlife. Super impressed.

(edit:)
I am having an issue where it is only working in debug mode.
Trying to tinker with it now and figure out why...

Developer (1 edit) (+1)

That's because the script/event names are obfuscated in release (as far as debug_get_callstack is concerned), even though there's enough information to offer them.

This should be fixed in one of the future runtime updates, but for now there's my free extension which partially mitigates the problem (makes it work for scripts) https://yellowafterlife.itch.io/debug-get-callstack-js

Oh cool, dang you are so on top of this stuff it's inspiring. 馃ぉ馃専