tylorlilley
Member
Hi, I am having a strange error. What's more, it's not an error I have ever run into on my mac, but when I run the same exact game code on my windows machine it is fairly frequent. Not sure if that's a red herring or not..
Anyway, in my parent object's create event (obj_spider), I have simply:
And in that same object's room start event, I then have:
The error being thrown is coming from a child of this parent object (obj_spider). But I have checked and triple checked and that object is calling event_inherited() as the first line in its own Create AND its own Room Start events. The error being thrown is saying that the initial_x variable is not set before reading it, but since create events happen before room_start events, how can this be the case? What's more, is I have other children of this parent object and they never seem to throw this error, even though they would also be inheriting things in the same way. What could be going on here?
Error being Thrown:
Thanks in advance for any help you can provide.
Anyway, in my parent object's create event (obj_spider), I have simply:
GML:
initial_x = x;
initial_y = y;
GML:
x = initial_x;
y = initial_y;
Error being Thrown:
GML:
___________________________________________
############################################################################################
ERROR in
action number 1
of Other Event: Room Start
for object obj_enemy:
Variable obj_spider.initial_x(100483, -2147483648) not set before reading it.
at gml_Object_obj_enemy_Other_4
############################################################################################
gml_Object_obj_enemy_Other_4 (line -1)
gml_Object_obj_spider_Other_4 (line -1)
Last edited: