OK, I'm confuzzled.

Here is the offending snippet:
code:
:TIME
SETTIME "CONSTELLATION"

IF @error <> 0
GOTO WRITEERROR
ENDIF

...

:WRITEERROR

IF OPEN(1,"C:\kixtart.log",5) = 0
WRITELINE(1,@USERID + CHR(9) + @DATE + CHR(9) + @TIME + CHR(9) + @LSERVER + CHR(9) + $err + CHR(9) + @serror + CHR(13) + CHR(10))
ELSE
BEEP
MESSAGEBOX("Errors running logon script and unable to open log file.","WARNING!",0+48+0+0,10)
ENDIF

The problem is that the writeerror piece is outputting a return code of 0. What between the SETTIME and WRITELINE is generating a new @ERROR, and how do I get around it?

[ 10 April 2002, 00:04: Message edited by: Chris Bingel ]