The code below is a snippet of a larger bit of code that runs fine; it's the script below I'm having problems with...
Edit: Added $vars for the conditional in question...
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 $OpenPDFile = 0 AND $OpenOutputFile = 0
$rLine = ReadLine(3)
Do
$rArrLine = Split($rLine,',')
$pdLine = ReadLine(4)
Do
$pdArrLine = Split($pdLine,',')
? $pdArrLine[4]
$pdLine = ReadLine(4)
Until @ERROR <> 0
$rLine = ReadLine(3)
Until @ERROR <> 0
Else
? 'Error: ' + @ERROR + ' -- ' + @SERROR
Endif
I don't know why but the very first conditional is working because the files are getting created and stuff but my ELSE code is executing too... BUT it's executing as "Error: 0 -- The operation completed successfully." Does that make sense?
Edit2: Interestingly enough, when I comment my whole second Do loop, it runs fine echoing the first array... if that helps at all.