• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 JavaScript errors when testing HTML5

Ayziak

Member
Hi All!
I've just started trying out HTML5 testing, and I'm having a bit of trouble... When I launch my game, in the browser, a loading screen shows up, but then the screen goes blank. The debug looks normal, however, the browser console displays the same error, repeatedly and indefinitely.

"Uncaught TypeError: Cannot read property '_gM' of undefined." Here's a screenshot:

(I'm not too familiar with JS or HTML.)
This seems like an error in transcoding. Would any of you know a fix?
 

FrostyCat

Member
Errors like this on the HTML5 export aren't always the compiler's fault, it can sometimes indicate coding problems that VM exports forgave by mistake.

If you want to know what the corresponding GML lines to these errors are, run your project with F6 (debug mode).
 

True Valhalla

Full-Time Developer
GMC Elder
Running this in debug mode will make the console output easier to understand. The "property" name is obfuscated by default otherwise.

Additionally, it can be worth doing a Windows compile to quickly highlight certain errors.
 

Ayziak

Member
Errors like this on the HTML5 export aren't always the compiler's fault, it can sometimes indicate coding problems that VM exports forgave by mistake.

If you want to know what the corresponding GML lines to these errors are, run your project with F6 (debug mode).
Running this in debug mode will make the console output easier to understand. The "property" name is obfuscated by default otherwise.

Additionally, it can be worth doing a Windows compile to quickly highlight certain errors.
Very Interesting!
Yes, by running in debug, I found that one step function was causing that error. Thank you, I hadn't yet tried both debug and console at the same time. Now just onto fixing the rest of my game, as many other aspects seem to function differently. I suppose that's just the process! Thank you again for your help!
 
Top