• 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 Major html5 function bug in 2.3.3 Beta Release and how to fix!

I've been working on a fairly large project(approx 256 pages of code) with the intention of releasing it to html5 as well as windows.
I've been making use of new features in 2.3 and when issues arose making example projects to send to yoyo games demonstrating errors. Then they'd fix them in the next update and html5 would be usable again.
For example- recently I found struts were causing issues with save buffers, I reported the bug, and it was fixed with the latest beta.
However, it turns out something else was making my game unplayable on HTML5.
This is the error message I get-
Unhandled Exception - Uncaught { message : "undefined value in expression", longMessage : "undefined value in expression", stacktrace : [ "function _Le("undefined value in expression")
tracing things back its an error in gamemaker's engine not my code.
1622800115192.png
I've tried tearing down as much of my code and simplifying things to identify whats triggering the issue so I can file a bug report but I've had no success.
I've got no idea what's causing the issue. Any advice on how to narrow down the issue?
UPDATE:
old bug was fixed and a new one came in in its place.
The following code runs fine in the stable release but crashes in the beta-
In the step call a the function-
GML:
if mouse_position_sprite(sprite_index,x,y,mouse_x,mouse_y) {
//Do Something
}
the function itself-

GML:
function mouse_position_sprite(sprite,x,y,mousex,mousey) { //function mouse_position_sprite(sprite,x=10,y=10,mousex,mousey) stops it from crashing strangely...
                     //Get bounding box position and dimensions
             var bbox_x = x+ sprite_get_bbox_left(sprite)-sprite_get_xoffset(sprite) //This line by itself crashes the game in html5.
             var bbox_y = y+ sprite_get_bbox_top(sprite)-sprite_get_yoffset(sprite)
             var bbox_x2 = x+ sprite_get_bbox_right(sprite)-sprite_get_xoffset(sprite)
             var bbox_y2 = y+ sprite_get_bbox_bottom(sprite)-sprite_get_yoffset(sprite)
        if point_in_rectangle(mousex, mousey,bbox_x,bbox_y,bbox_x2,bbox_y2)
            return true else return false
}
I'm submitting a bug report now, but If functions of yours start randomly crashing your project in html5 and you have to get your project running in the beta- try inserting default arguments like ,x=10,y=10.
 
Last edited:
Top