Relic
Member
I think this is a GM bug rather than my own code but will get your opinions first.
Create event:
Room end event:
Error:
############################################################################################
FATAL ERROR in
action number 1
of Other Event: Room End
for object obj_controller_VO:
Variable obj_controller_VO.current_vo(100328, -2147483648) not set before reading it.
at gml_Object_obj_controller_VO_Other_5 (line 3) - if current_vo {
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_controller_VO_Other_5 (line 3)
How can current_vo not be defined for the room end event when it is initialised in the create event?
This ONLY happens when I run in debug mode but not every time. It happens as soon as the game compiles. I have an initialisation room which a global controller changes rooms in the first step event. I try and put a breakpoint here to catch the code before the room transition - but the error occurs before this. So why is a room event code having a fit over "uninitialised" variables before it should even happen?
Create event:
Code:
current_vo=noone;
vo_queue=ds_queue_create()
Code:
if current_vo {
audio_stop_sound(current_vo)
}
ds_queue_empty(vo_queue);
############################################################################################
FATAL ERROR in
action number 1
of Other Event: Room End
for object obj_controller_VO:
Variable obj_controller_VO.current_vo(100328, -2147483648) not set before reading it.
at gml_Object_obj_controller_VO_Other_5 (line 3) - if current_vo {
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_obj_controller_VO_Other_5 (line 3)
How can current_vo not be defined for the room end event when it is initialised in the create event?
This ONLY happens when I run in debug mode but not every time. It happens as soon as the game compiles. I have an initialisation room which a global controller changes rooms in the first step event. I try and put a breakpoint here to catch the code before the room transition - but the error occurs before this. So why is a room event code having a fit over "uninitialised" variables before it should even happen?