If statement not working right

Ok, I have a weird bug. For one of the If statements,it will still go through even if it shouldn't.

if(var == 0) [var = 0] OKAY!
if(var == 0) [var = 2] ...wtf?

Also on a curious note, on my ultimate visual studio 2010, I can't put a breakpoint on that If statement. It puts a breakpoint to the next place you can put one?

Any advice?
Firstly, you're missing a semicolon on both. The first if does nothing anyway. You should be using curly braces not square brackets.
Topic archived. No new replies allowed.