flyinian
Member
I'm getting the error, "unable to convert string "Count 2" to int64" when I run the below code.
I'm just learning arrays so, I don't fully understand how they operate yet.
I am trying to create an array that checks to see if all the items in the array returns all zeros or not.
Thank you.
I'm just learning arrays so, I don't fully understand how they operate yet.
I am trying to create an array that checks to see if all the items in the array returns all zeros or not.
GML:
var array;
var enemy_key1 = array[choose("Count 1", "Count 2", "Count 3")];
var enemy1 = EnemyList[? enemy_key1];
var check = false;
for(var i = 0; i <= 0; ++i){
if (array[i] == true){
check = true;
}
}
if(check == true){
noenemy = true;
};
if(noenemy = true){
show_debug_message("no enemy numbers to deduct");
exit;
}
else
{
show_debug_message("Enemy exists");
enemy1 -= EnemyList[? "totalcountdifference"];
EnemyList[? enemy_key1] = enemy1;
show_debug_message("Enemy Count adjusted");
};
};
};