Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Can you also post a screenshot of your HTML5 preferences? I’m doing this here (is that the default?) and I’m not seeing your error, but I’m seeing some other things:

audio_group_name crashes for lack of an audio group

Where did it go

You can find this bit

	for(var l_i=0;l_i<256;l_i++){
		var l_agn=audio_group_name(l_i);
		if(l_agn==undefined||l_agn==""||l_agn=="<undefined>")break;
		live_api_asset_add(l_agn,l_i);
	}

And replace it with

	for(var l_i=0;l_i<256;l_i++) try{
		var l_agn=audio_group_name(l_i);
		if(l_agn==undefined||l_agn==""||l_agn=="<undefined>")break;
		live_api_asset_add(l_agn,l_i);
	}catch(_){}

Sprite reloading

After fixing the sprite_set_live call to use the right sprite, it turns out that you can’t buffer_save ➜ sprite_add anymore..? But that’s okay, 2024.11 supports Data URIs, so you could find this

				var l_tb=buffer_base64_decode(ds_list_find_value(l_frames,l_i1));
				if(l_tb==-1){
					live_log_script("Error: couldn't decode base64 for "+l_name+".",2);
					continue;
				}
				buffer_save(l_tb,l_tmp);
				buffer_delete(l_tb);

and replace it with

				if (os_browser == browser_not_a_browser) {
					var l_tb=buffer_base64_decode(ds_list_find_value(l_frames,l_i1));
					if(l_tb==-1){
						live_log_script("Error: couldn't decode base64 for "+l_name+".",2);
						continue;
					}
					buffer_save(l_tb,l_tmp);
					buffer_delete(l_tb);
				} else l_tmp = "data:image/png;base64," + ds_list_find_value(l_frames,l_i1);

… but that will not save you, for sprite_assign is non-functional on latest runtime - the sprite becomes transparent and its sizes are reported as -1.

Perhaps you could workaround this by rewriting that whole block of code to use sprite_replace ➜ sprite_add_from_surface, but I wouldn’t be too hopeful about stability of those functions either.

> Can you also post a screenshot of your HTML5 preferences?

I’m not getting any other errors in your test project with these settings either, but are you getting the original method_get_self error after making these changes? I’m noticing that your screenshot above doesn’t have it

If you are only getting it in your main project with latest GMLive, you could find this bit

	static h_set_func = function(l_func) {
		var l_rawFunc;
		if (is_method(l_func)) {
			l_rawFunc = method_get_index(l_func);
			var l__self = method_get_self(l_func);

and replace it with

	static h_set_func = function(l_func) {
		var l_rawFunc;
		if (is_method(l_func)) {
			l_rawFunc = method_get_index(l_func);
			var l__self;
			try {
				l__self = method_get_self(l_func);
			} catch (e) {
				l__self = undefined;
				show_debug_message("Error getting method self for " + self.h_signature + ": " + string(e));
			}