J
John Ashmore
Guest
I am trying to find an object in a ds_list, then read values assigned in variables within that object. Depending on the boolean variable "moving" I want to delete all the matching objects in the ds_list. Can I use something like:
var tempobj = ds_list_find_value(obj_eggspawner.eggslisttube1,0);
if (!tempobj.moving)
{
ds_list_delete(obj_eggspawner.eggslisttube1,0)
}
This code is written within object obj_player.
The ds_list is 'eggslisttube1' which is within the obg_eggspawner.
I am getting an error which is:
Variable obj_player.'unknown variable' (100016, -2147483648) not set before reading it.
at gml_Object_obj_player_KeyPress_87 (line 42) - if (!tempobj.moving)
var tempobj = ds_list_find_value(obj_eggspawner.eggslisttube1,0);
if (!tempobj.moving)
{
ds_list_delete(obj_eggspawner.eggslisttube1,0)
}
This code is written within object obj_player.
The ds_list is 'eggslisttube1' which is within the obg_eggspawner.
I am getting an error which is:
Variable obj_player.'unknown variable' (100016, -2147483648) not set before reading it.
at gml_Object_obj_player_KeyPress_87 (line 42) - if (!tempobj.moving)