How to debug AppleScript error: "Expected “*)” but found end of script."
There's a syntax highlighting package for AppleScript for the text editor Atom. It works better than the one provided with Script Editor, as it will correctly identify multiline comments, even if the script itself doesn't compile:



From there, it should be easy to identify the missing *).