Glenn BarnasGlenn Barnas KiX Supporter
Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Not sure why you're going to so much effort during script development and debugging - SetConsole(hide) and MessageBox(). Yikes!
What's csvLib? If it's the CSV UDF from my site (or mine from KORG) just call it "CSV.UDF" - using "lib" as part of a udf filename implies it's a Library of related functions - CSV is a single UDF, so name it as such. This isn't contributing to your error, but deviates from standards, and that could come back to bite you (you know where) later.
At this stage, drop the SetConsole and MessageBox garbage - too complicated. Open a command prompt & CD to your folder where these scripts are and run "Kix32 myscript.kix" (using your script name, of course).
Good way to debug: Get the MSG() UDF and include that, too.. declare a global var called $DEBUG, set it to 1, and then sprinkle your code with
Dbg('Line 29: X=' + $X)
type messages - they'll display on the command line. The "Line 29" is an example - you're better served by logical names or messages, like
Dbg('result of CSV(Readline) is ' + $Temp)
When you're done debugging, simply set $DEBUG=0.
This will also allow you to enumerate the array values without popping up dozens of message boxes. Consider the code below:
Glenn
Edited by Glenn Barnas (2008-07-2911:44 PM) Edit Reason: bad line breaks
_________________________ Actually I am a Rocket Scientist!