• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code Persistant objects does not exist sometimes

J

James Newnorth

Guest
Sometimes when I try to reference persistent objects from "Clean Up" in other objects which are not persistent as I am switching rooms, I sometimes get the following error message. Is this intended, or am I doing something wrong? I'm accessing the object via it's object name, rather than its instance name (it's unique).

_________________________________________
############################################################################################
FATAL ERROR in
action number 1
of <Unknown Event>
for object obj_rm_game_explore__gui_menu:

Unable to find any instance for object index '3' name 'gui_cursor'
at gml_Object_obj_rm_game_explore__gui_menu_CleanUp_0
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_rm_game_explore__gui_menu_CleanUp_0 (line -1)
 

Ricardo

Member
I use several persistent objects in one project that also has several rooms and I haven't had issues like this. I'm not using the "Clean Up" event, though. I'd suggest you to try to create a small example to reproduce this problem and then fill a bug.
You also should take into consideration what the documentation says about how the "Clean Up" event works; maybe it can help you figure out if you are - or not - doing something wrong.
 
Top