The errors are caused by manually editing your script. Now it won't compile anymore. Delete the lines that you added - they don't make sense here - and start over.
Only edit your script when you know what you're doing! The best way to learn how to program a script is the C-Script Workshop.