In Suite Answers, you can find a lot of information on how scripts are laid out which should help a lot in troubleshooting. https://netsuite.custhelp.com/app/answers/detail/a_id/65784 (SuiteCloud (Customization, Scripting, and Web Services) SuiteScript)