Sargonnas
Member
IDE v2.2.5.481
Rutime v2.2.5.378
When leaving any room, the game crashes because a generated object no longer exists. My object generation has worked flawlessly for months and I haven't changed any of those functions for some time. I just can't understand how this error is cropping up when I check that the object exists right before implementing the code. Apologies of my noobishness is blinding me here, I'm more of an artist than a programmer.
Important notes:
* Each of these troubled objects is the child of another object, which is created during the Init room and is persistent, if that matters.
* The error only occurs when leaving a room. The objects which GMS2 can't find on exiting the room do exist and work fine while inside the room.
* My most recent efforts in the game (some time before this error) have been with save systems, which caused me to parent all the problem objects to another for the purpose of saving. The code worked fine between rooms with the current version of the save system, but I'm including this because I feel its the most likely candidate. The save system I'm using is based on Shaun Spaulding's youtube tutorial: GameMaker: Better Saving & Loading
** The problem arises even when I don't save or load, so I'm not sure at all if my save system is at fault.
* The example listed below is not singular, any object I have which generates another during creation now causes this crash. And there are a lot.
The Code (in the main Step phase of the object):
The Error:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object oLoche:
Unable to find any instance for object index '104553'
at gml_Object_oLoche_Step_0 (line 80) - Lights.image_speed = 0;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_oLoche_Step_0 (line 80)
Rutime v2.2.5.378
When leaving any room, the game crashes because a generated object no longer exists. My object generation has worked flawlessly for months and I haven't changed any of those functions for some time. I just can't understand how this error is cropping up when I check that the object exists right before implementing the code. Apologies of my noobishness is blinding me here, I'm more of an artist than a programmer.
Important notes:
* Each of these troubled objects is the child of another object, which is created during the Init room and is persistent, if that matters.
* The error only occurs when leaving a room. The objects which GMS2 can't find on exiting the room do exist and work fine while inside the room.
* My most recent efforts in the game (some time before this error) have been with save systems, which caused me to parent all the problem objects to another for the purpose of saving. The code worked fine between rooms with the current version of the save system, but I'm including this because I feel its the most likely candidate. The save system I'm using is based on Shaun Spaulding's youtube tutorial: GameMaker: Better Saving & Loading
* The example listed below is not singular, any object I have which generates another during creation now causes this crash. And there are a lot.
The Code (in the main Step phase of the object):
Code:
if Gate != noone or Lights != noone or Engine != noone
{
if action == "closed"
{
Gate.x = Gate.xclosed;
image_speed = 0;
activated = false;
Engine.rumbling = false;
Lights.image_index = 0;
Lights.image_speed = 0;
}
if action == "open"
{
Gate.x = Gate.xopen;
activated = false;
image_speed = 0;
Engine.rumbling = false;
Lights.image_index = 0;
Lights.image_speed = 0;
}
}
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step Event0
for object oLoche:
Unable to find any instance for object index '104553'
at gml_Object_oLoche_Step_0 (line 80) - Lights.image_speed = 0;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_oLoche_Step_0 (line 80)