Ok so I have a crazy bug going on.
I tried to take a short video. Unfortunately youtube sped it up heaps so you might have to watch it a few times.
this is the code
The contents of the IF statement are getting executed whether the condition is met or not. In the movie I step through three iterations. Keep an I on the variable "blah". In the first iteration it is -1, in the second it is 22 and in the third it is -1 again. As you can see the last line of code in the IF statement is still getting executed when blah = -1.
Any explanations? It's so frustrating as this is the final bug before I can get this version of my app out the door.