As mentionned in the title, my GameMaker project works fine when targeting Windows.
However, when I build it for HTML5, I got those errors in the Chrome developer console:
Destructive Dark.js?VYNZB=1666826811:7 Uncaught TypeError: Cannot read property '_42' of undefined
at _Qw1._M [as _L] (Destructive Dark.js?VYNZB=1666826811:7)
at _Qw1._a4 (Destructive Dark.js?VYNZB=1666826811:1490)
at _a72._a4 (Destructive Dark.js?VYNZB=1666826811:1380)
at _lK1 (Destructive Dark.js?VYNZB=1666826811:1155)
at _9v2 (Destructive Dark.js?VYNZB=1666826811:1742)
at _Mu2 (Destructive Dark.js?VYNZB=1666826811:1748)
at _Ju2 (Destructive Dark.js?VYNZB=1666826811:1733)
I suppose this error is not really useful since it seems to come from the obfuscated Javascript... However, I noticed that this error appears on the "Left mouse button released" event on one of my object. The code associated with this event is the following:
/// Select the square or switch its place with the current selected square
game_manager = instance_find(obj_game_manager, 1);
if (game_manager.lock_timer == 0) {
if (game_manager.selected_square == noone) {
game_manager.selected_square = self;
inst = instance_create(x, y, obj_selection);
inst.depth = -100;
inst.image_alpha = 0.6;
}
else if (game_manager.selected_square == self) {
game_manager.selected_square = noone;
with (obj_selection) {
instance_destroy();
}
}
else {
// Lock interactions
game_manager.lock_timer = 2;
// Switch the array cells
var x_temp = game_manager.selected_square.x_grid;
var y_temp = game_manager.selected_square.y_grid;
var color_temp = game_manager.selected_square.color;
game_manager.grid_array[x_temp, y_temp] = color;
game_manager.grid_array[x_grid, y_grid] = color_temp;
game_manager.selected_square = noone;
with (obj_selection) {
instance_destroy();
}
with (game_manager) {
event_perform(ev_alarm, 0);
}
}
}
Not much info sorry, but I have no ideas where this error came from.