Hello!
I’m having trouble getting live room reloading to work. After following the documentation, I kept getting the error below when the game started.
_________________________________________
############################################################################################
ERROR in
action number 1
of Create Event
for object <undefined>:
room_goto argument 1 incorrect type (undefined) expecting a Number (YYGI32)
at gml_Script_room_goto_live (line 3124) - room_goto(l_rm);
############################################################################################
gml_Script_room_goto_live (line 3124)
gml_GlobalScript_scr_room_updated (line 24) - room_goto_live(argument0);
I found that if instead of having room_goto_live(argument0)
in the scr_room_updated
script, I wrote the function below in the script,
function scr_room_updated(arg){
room_goto_live(arg);
}
then the game could transition to the live room, but when it was updated, the game would crash with
___________________________________________
############################################################################################
ERROR in
action number 1
of Async Event: HTTP
for object obj_gmlive:
Unable to find a handler for exception { value : Please add a completely empty room, add live_room_start(); to it's Creation Code, and assign it to live_blank_room in obj_gmlive's create event., message : Please add a completely empty room, add live_room_start(); to it's Creation Code, and assign it to live_blank_room in obj_gmlive's create event., longMessage : , script : , stacktrace : [ "gml_Script_gml_std_haxe_Exception_thrown:2961","gml_Script_room_goto_live:3120","gml_Script_live_gmlive_asset_api_room_updated_impl:3130","gml_Script_live_async_http_1:152","gml_Script_live_async_http:244","gml_Object_obj_gmlive_Other_62:1",0 ], h_native : { value : "Please add a completely empty room, add live_room_start(); to it's Creation Code, and assign it to live_blank_room in obj_gmlive's create event.", message : "Please add a completely empty room, add live_room_start(); to it's Creation Code, and assign it to live_blank_room in obj_gmlive's create event.", longMessage : "", script : "", stacktrace : [ "gml_Scrip
at gml_Script_room_goto_live (line 3120) - if(!room_exists(live_gmlive_asset_api_blank_room))throw gml_std_haxe_Exception_thrown("Please add a completely empty room, add live_room_start(); to it's Creation Code, and assign it to live_blank_room in obj_gmlive's create event.");
############################################################################################
gml_Script_room_goto_live (line 3120)
gml_Script_live_gmlive_asset_api_room_updated_impl (line 3130) - room_goto_live(l_rm);
gml_Script_live_async_http_1 (line 152) - live_gmlive_asset_api_room_updated(l_rq);
gml_Script_live_async_http (line 244) - live_async_http_1(l_map);
gml_Object_obj_gmlive_Other_62 (line 1) - live_async_http();
My runtime version is 2022.6.1.40
I can also send a sample project that reproduces the issue if needed.