The numofbullets is a global variable; only the i and j variables are declared in the timer.