I’ve moved your post to the scripting forum for you. Also, please edit your post to use code-tags when posting code.
Error codes are meaningless here. The error code reports both the line/column numbers and a description which you should also post.
The compiler is telling you it’s expecting a closing brace so look at the braces and ensure that each opening brace has a respective closing brace.
Thanks.