Hit Ctrl+H in the script editor, it will pop up a messagebox if you are missing any braces anywhere. Make sure it doesn't pop up any messageboxes.