Ok, some further progress... when I do some error trapping, I actually found in the loop where the error is occurring and the following error is reported by @ERROR/@SERROR:

"Error: -1 -- Error(317 / 13D) while retrieving error information for FFFFFFFF"

...then that's when it gives the KiX beep and says: "array reference out of bounds"

If it helps anyone to see where the error gets trapped:

Code:
$OpenReorgFile  = Open(3,$ReorgFile,2)
$PhoneDirFile = @ScriptDir + '\Balad_Telephone_Book.csv'
$OpenPDFile = Open(4,$PhoneDirFile,2)
$OutputFile = @ScriptDir + '\Morale_Call_Output.csv'
$OpenOutputFile = Open(5,$OutputFile,5)

If $OpenReorgFile = 0 AND $OpenOutputFile = 0 AND $OpenPDFile = 0
$rLine = ReadLine(3)
Do
$rArrLine = Split($rLine,',')
? '1: ' + $rArrLine[4]
$pdLine = ReadLine(4)
If @ERROR <> 0
? 'Error: ' + @ERROR + ' -- ' + @SERROR
Endif
sleep 5
Do
$pdArrLine = Split($pdLine,',')
? '2: ' + $pdArrLine[4]
$pdLine = ReadLine(4)
Until @ERROR <> 0
$rLine = ReadLine(3)
Until @ERROR <> 0
Else
? 'Error: ' + @ERROR + ' -- ' + @SERROR
Endif



If grabs the first variable in the first loop, runs it against the whole file in the second loop, grabs the second variable for the first loop but when it goes for the first ReadLine() in the second instance of the second loop is when I get the error.

Anyone have any ideas?


Edited by thepip3r (2006-02-03 03:51 AM)