My advice: Do not "solve" a problem by just taking away some code.
Find and fix the mistake. In case of a mere syntax error it's very easy because the compiler tells you what's wrong. You only need to find out why.
It's more difficult to find bugs that are no syntax errors. But if you already surrender to a syntax error, you have no chance to accomplish anything. Besides, you just need to post your code here and people will tell you what's wrong.