P
PreviaSens
Guest
I've been working on a school project recently and earlier today when I thought I was done, this message would come up whenever my character tried to enter the spawner zone / area. I'm fairly new and I'm pretty sure this is for the collision with spawner and player code but I can't find the problem and what to change. The error message is below and below that is the code I used. If anyone could help me with this that'd be great.
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step EventoPlayer
for object oSpawner:
trying to index a variable which is not an array
at gml_Object_oSpawner_Collision_ef39636d_a338_43dc_9c03_35385172afbe (line 15) - remaining[total_waves]++;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_oSpawner_Collision_ef39636d_a338_43dc_9c03_35385172afbe (line 15)
CODE USED
if (triggered == false)
{
triggered = true;
total_waves = 1;
for (var i = 0; i < ds_list_size(waves); i++)
{
var thisentry = ds_list_find_value(waves,i);
if (thisentry [_WAVE] > total_waves)
{
total_waves++;
remaining[total_waves] = 0;
}
remaining[total_waves]++;
}
}
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Step EventoPlayer
for object oSpawner:
trying to index a variable which is not an array
at gml_Object_oSpawner_Collision_ef39636d_a338_43dc_9c03_35385172afbe (line 15) - remaining[total_waves]++;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_oSpawner_Collision_ef39636d_a338_43dc_9c03_35385172afbe (line 15)
CODE USED
if (triggered == false)
{
triggered = true;
total_waves = 1;
for (var i = 0; i < ds_list_size(waves); i++)
{
var thisentry = ds_list_find_value(waves,i);
if (thisentry [_WAVE] > total_waves)
{
total_waves++;
remaining[total_waves] = 0;
}
remaining[total_waves]++;
}
}