Because it doesn't follow the syntax of a "for" statement. Just look it up in a reference. If you meant to use a "if" statement, you need to make comparisons with the == operator not the = operator. You need to sort out your curly braces, there seem to be extras hanging off the bottom. Use ctrl-T in the IDE to auto format your code and it will indent and make it easier to see the correct bracketing.