Undesired if statement

You have a assignment in an if statement. might cause undesired behaviour