Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Not working on v2024.13.1.242

A topic by wiliam_omori created 98 days ago Views: 308 Replies: 7
Viewing posts 1 to 6

Hello, I'm trying to run on v2024.13.1.242, but the following error occurs:

___________________________________________

############################################################################################

ERROR in action number 1

of Create Event for object <undefined>:

room_goto argument 1 incorrect type (undefined) expecting a room

 at gml_Script_room_goto_live (line 12172) -               room_goto(l_rm);

############################################################################################

gml_Script_room_goto_live (line 12172)

gml_GlobalScript_scr_room_updated (line 1) - room_goto_live(argument0);





Developer

When making scripts, code should be put in a function in recent GM versions:

function scr_room_updated() {
    room_goto_live(argument0);
}
(1 edit)

Thank you very much, now it's working!
Now I have a problem with the sprites, they don't update, I added the following code in the create of obj_gmlive:

live_sprite_updated = function(_spr) {
    show_debug_message("Reloaded " + sprite_get_name(_spr));
}

when i add sprite_set_live it works:

sprite_set_live(spr_test, true);
Developer (1 edit)

live_sprite_updated gets called after a sprite is updated (so that you can place it in a room for viewing or re-apply anything you need), it doesn’t do anything on its own.

when I update a sprite it is not calling show_debug_message, nothing appears in Output

for each sprite i need to call sprite_set_live? is there a way to make all sprites live?

Developer

You can use asset_get_ids to get an array of all sprites and call sprite_set_live on each, but note that this can be costly on large projects as the server will have to watch a lot of files for changes.

Typically you might use get_string and asset_get_index to make yourself a little debug thing where you can paste a name of a sprite to watch, or make it so that you can press a key to watch the sprite(s) of an instance under the mouse.

ok, thank you very much. Yes, it is just for testing in a separate small project