If you get errors, please post the full text of the error message.

Make sure your testing for equality uses the correct operator: ==
I see what looks like an assignment operator(=) in your code