You probably have a syntax error - missing quote or mismatched pair of tokens. Fastest way to locate this is with the SANITY UDF, (posted here, requires some glue code to use) or simply download the KixDev package from my web site.

With KGen, just rename your script to a .TXT file extension and type KGEN Scriptname. It will copy the file back to the .KIX file and then analyze it for all kinds of issues. It will report the line on which the issue occurred, and create several report files. The most useful for diagnosing is a "map" of all the paired statements, indented so you can easily match the start and end of each pair. Only the first few characters are displayed along with the line number.

I write nearly every script using KGen.. it automatically locates and includes the UDF files from my library for me and finds most issues before I ever run the script.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D