"string" is an undeclared identifier?

“=” is assignment, “==” should be used to test for equality.