It is a variable that counts the quantity of asteroids. I made that you said, and it shows “74” (that is the correct quantity of asteroids)
The code is:
aux = 0
for i = 1, cuentaasteroides do
aux = aux + 1
if asteroide[aux] ~= nil then
transition.cancel( asteroide[aux].transicion)
display.remove(asteroide[aux])
asteroide[aux] = nil
end
end
print(cuentaasteroides)
Is it correct?