You should use the == operator to compare int values. The = is the assignment operator.