Type or namespace definition, or end-of-file expected

Please use code tags .

Not immediately sure about the specific error message, but the main thing that jumps out at me about your code is that your "if"s are wrong. An “if” should have parentheses around the thing you are testing, it should not end with a semicolon, and SetActive is not a thing you can test because it has no return value.