Suddenly the boolean flag value is disappeared!?....Problem in reload bullet

I got the problem about making bullets.
The logic is simple as normal bullet system uses.
When the bullet is out of the screen, I set the move flag(boolean) is false. When the move flag is false, the bullet will be reload and then the flag will be true.

The bullet reloaded for a while and suddenly did not reload and what made me so surprise was the move flag value was empty.
The output from print() is
true
true
(blank)
(blank)
!! I was shocked so I tested and with 0 and 1 instead of true and false.
I got only the same result(bullet suddenly stopped reload) but there are no (blank) in print() debug. I got only "1" as false value.

It looks like the program is suddenly stopped.
My scene has only bullet so, it should not be complicated. I use corona sdk for windows.
Do I miss some important information about API? Any advice??

Sounds like the bullet is being removed after a certain amount of time, but unless you post code there's no way to know what's going on.

@XenonBL
I did not use any timers and I found that when I make bullet move with certain amount of value, everything is fine. It is really hard to say what I found is a true reason for the problem or not. Need the specialist to confirm....

I use cos/sine for bullet movement.
I found that when the value is like 200.00552582220...
Everything is stop.
And I set the angle in the minus value, also got the same problem.

I am not sure that

1
2
3
if(object.y > 200)then
reset flag....
end 
views:1566 update:2011/10/25 9:10:48
corona forums © 2003-2011