Ok, thanks. That did it.
On another note, I think I remember reading in a tut on this site that in a for loop, any one of the 3 fields (i.e. variable initialization, condition, or variable update) can be left blank if necessary, only the semicolons have to be there. But oddly enough that did not work.
I had to change the
Code:
for ( ; x != 1; ; )
line to a
Code:
for (int i; x != 1;)
instead, before it worked.