E
Edeyz
Guest
Sorry if the answer is obvious or something but I cant work out why its doing this.
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Other Event: Room Start
for object obj_HUDParentShipDesign:
Variable obj_HUDShipDesignBack.numuberOfHUDObjects(100014, -2147483648) not set before reading it.
at gml_Object_obj_HUDParentShipDesign_StartRoomEvent_1 (line 4) - for (i = 0; i < numuberOfHUDObjects; i ++)
############################################################################################
I have 2 events in obj_HUDParentShipDesign the first is a
CREATE:
///Generates the array
numuberOfHUDObjects = 0;
The second is a
ROOM START:
obj_HUDShipDesignBack is child of obj_HUDParentShipDesign(Parent object) but seams to be using a line of code it should have nothing to do with.
Thank you
Edeyz
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Other Event: Room Start
for object obj_HUDParentShipDesign:
Variable obj_HUDShipDesignBack.numuberOfHUDObjects(100014, -2147483648) not set before reading it.
at gml_Object_obj_HUDParentShipDesign_StartRoomEvent_1 (line 4) - for (i = 0; i < numuberOfHUDObjects; i ++)
############################################################################################
I have 2 events in obj_HUDParentShipDesign the first is a
CREATE:
///Generates the array
numuberOfHUDObjects = 0;
Code:
with obj_HUDParentShipDesign
{
if object_index != other.object_index
{
other.HUDShipDesign[other.numuberOfHUDObjects, 0] = object_index; //The object Index
other.HUDShipDesign[other.numuberOfHUDObjects, 1] = x; //X
other.HUDShipDesign[other.numuberOfHUDObjects, 2] = y; //Y
other.numuberOfHUDObjects ++;
}
}
ROOM START:
Code:
///Loads the HUD
if room = rm_shipDesign
{
for (i = 0; i < numuberOfHUDObjects; i ++)
{
instance_create(HUDShipDesign[i, 1],HUDShipDesign[i, 2],HUDShipDesign[i, 0]) //Creates the HUD Item
}
}
Thank you
Edeyz