I wrote this code:
beep();
var i = 0;
while(firenumber<5)
{
for (i=1; i<5; i++)
{
test = i;
beep();wait(-2);
} //beep every second
}

This was the operational sequence:

- firenumber = 0
*beep*
*beep*
(1 second later)
*beep*
- i = 1
(1 second later)
*beep*
- i = 2
(1 second later)
*beep*
- i = 3
(1 second later)
*beep*
- i = 4
(1 second later)
*beep*
- i = 1
- I extinguished one of the five fires
- firenumber = 1
(1 second later)
-nothing happened, i stayed on 1.
- I extinguished the other four fires
- firenumber = 5
- nothing happened


I think it's the same strange problem from here:

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Main=36996&Number=302333#Post302333


Hilf mir, dir zu helfen!