Added note:
The script editor has a button that can search for mismatches in { and }. Simply press
ALT+R and go to the script file that contains the code you're using. Then press the '{}' button, should help.
Just an FYI, this is not a bug report, it's a problem with a script - therefore, best to post in the 'Scripts & Popups' forum for future reference
G'luck.
Regards,