What's wrong? Controlling void loops with integers.

As AWOL is pointing out, you are using (in this case testing) a variable before setting it to a known value. Often a newly declared variable with default to zero (which is also boolean false). Not always, though, sometimes the default value may be what ever was left over in the memory space now being used for the variable. Best practice is to explicitly set a variable's value before using it so it is in a known state before it is used.

I also notice that you declare once twice. The first time is outside of any function so you have a variable called "once" that has a global scope. Any function can access it unless they declare their own variable with the same name. Then in loop() you declare another variable called "once" that has local scope to loop() masking the global variable named "once". But because it doesn't use the static keyword it looses it's contents on every iteration of loop().

Only declare once once, either as a global, or local to loop() with the static keyword. Also, make sure that it has a default value before you use it for anything.