GameMaker Inherited variable not getting initialised [SOLVED: IDE bug]

FacesOfMu

Member
I've got an object that has this inheritance:

par_all
obj_item
obj_container

In the Create event of obj_item, there's
Code:
// obj_item Create Event
event_inherited();
debug_start = 10;
In the Create event of obj_container, there's
Code:
// obj_container Create Event
event_inherited();
In the Clean Up event of obj_container, there's
Code:
// obj_container Clean Up Event
var debug = debug_start;
At the end of my room, I get the following message:
Code:
ERROR!!! :: ############################################################################################
FATAL ERROR in
action number 1
of <Unknown Event>
for object obj_container:


Variable obj_container.debug_start(100051, -2147483648) not set before reading it.
 at gml_Object_obj_container_CleanUp_0 (line 1) - var debug        = debug_start; 
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_container_CleanUp_0 (line 1)
How can this happen?
 

Azenris

Member
did you check that the create is called, are you using instance_change or anything
Is container actually related to the item, did you forget the child-parent setup?
 

meseta

Member
as discussed on Discord, this is caused by a known GM bug where creating instances right after room_goto() results in the instances being created, but their create code not running. We discovered this bug some time ago, but I think we didn't file the bug ticket, I'll do so now.
 

FacesOfMu

Member
as discussed on Discord, this is caused by a known GM bug where creating instances right after room_goto() results in the instances being created, but their create code not running. We discovered this bug some time ago, but I think we didn't file the bug ticket, I'll do so now.
Thanks Meseta!
 
Top