Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

FATAL ERROR while messing with live room instances

A topic by Ivan Zanotti's MyMadnessWorks created Jun 13, 2024 Views: 304 Replies: 12
Viewing posts 1 to 5
(+1)

Hello YAL, I just bought the extension-- thanks for making such a great thing!

I'm currently facing a problem regarding live room editing, tho... Whenever I try to move an existing instance in the room editor, the game crashes showing this error:

############################################################################################
FATAL ERROR in Room Creation Code for room rm_live
ds_map_find_value argument 1 incorrect type (undefined) expecting a ds_map
 at gml_Script_live_room_loader_add_layer (line 13683) -        var l_ql_depth=ds_map_find_value(l_ql, "depth");
############################################################################################
gml_Script_live_room_loader_add_layer (line 13683)
gml_Script_live_room_loader_run_impl2 (line 14014) -               live_room_loader_add_layer(ds_list_find_value(l_lrs,l_lrk));
gml_Script_live_room_start (line 14046) -               live_room_loader_run_impl2(l_rm2);
gml_Room_rm_live_Create (line 1) - live_room_start();

I'm pretty sure I set up everything according to the documentation (I also tried following Shaun Spalding's video to no avail) . What could be causing this? I'm tagging this as bug, but please let me know if this is my own wrongdoing!

(I'm on the latest GM runtime but I also tried on the first 2024.2 one, should that information be helpful)

A few of these have been reported on the Gamemaker Kitchen, from the looks of it YAL is already looking into it!

Oh, thanks for letting me know!

Developer

The fact that this started happening all of sudden suggests that this is yet another format change brought by an IDE update, but I’m yet to look into it. If your project is relatively small, email me a copy as the other samples I have received are pretty big.

Thanks! I just sent an e-mail, please let me know if you receive it!

Developer (1 edit) (+1)

A further inspection reveals that it’s not been caused by a format change itself, but forgotten code from adjusting the format. You’ll want to find the following in GMLive script:

	var l_lrs = ds_map_find_value(l_rm, "layers");
	var l_lrk = ds_list_size(l_lrs);
	for (var l_lri = 0, l__g1 = ds_list_size(l_lrs); l_lri < l__g1; l_lri++) {
		live_room_loader_add_layer(ds_list_find_value(l_lrs, l_lrk));
	}

and replace it with

	var l_lrs = ds_map_find_value(l_rm, "layers");
	for (var l_lri = 0, l__g1 = ds_list_size(l_lrs); l_lri < l__g1; l_lri++) {
		live_room_loader_add_layer(ds_list_find_value(l_lrs, l_lri)); // <- lri instead of lrk
	}

Edit: and also find this

var l_ql_sublayer_count = ds_list_size(l_ql_sublayers);

and replace it with

var l_ql_sublayer_count = l_ql_sublayers != undefined && l_ql_sublayers != pointer_null ? ds_list_size(l_ql_sublayers) : 0;

I was able to fix my issues by following this. When do we expect a new commit to help future folks?

Developer

In some time - there are also some other things I’d like to fix and work I have to do

I have the same issue and trying this fix still returns the same "expecting a ds_map" error. (on runtime v2024.4.1.202)

Developer(+1)

Updated the notes - some layer types no longer have a sub-layer array now.

can confirm that additional fix has it working now, thanks!

I suspect this is somewhat related, I think I've found a smaller issue to do with live room instance ordering.

When reloading a room, the layer order is correct on reload, but it seems the instances within each of those layers get reversed so that instances that should be in front are now behind. Has this been reported? I can dig deeper and send an example if that would be helpful.

Developer

I think I fixed that, but probably have a look after the update releases - it’s kind of hard to write unit tests for room loading logic.