If you get an error about an "unexpected symbol", it usually means you wrote something wrong: bad variable name, unclosed brackets, unclosed "if" statements etc.
Protip : Whenever you write an "if" statement, ALWAYS put the "end" to close it before you start writing the middle. It's like...