trouble with timed delays

"if" needs to be followed by "==" and not "=".

And check that you have your brackets properly located and properly matched.

...R