While editing the script, if you press Control+H to check the script for invalid brackets, do you see an error message?

You may need to do this in other loaded scripts as well, in your aliases and remote sections. If any of them contain invalid bracket combinations, they could affect other scripts.