you can't pass @error and @serror the way you are there

Function ErrorLog($error,$serror, optional $logfile)
if $logfile
$log= $logfile
else
$log= "\\server\SoftwarePushes\sms\logging\@MDayNo_@MonthNo_@Year.log"
endif
$f=freefilehandle()
$openerr=OPEN($f,$Log,5)
if $openerr = 0
$ = WRITELINE($f,"Error $ERROR: $SERROR, @WKSTA, @USERID, @DATE, @TIME, @CRLF")
else
exit 1
endif
$=close($f)
Endfunction


Edited by Radimus (2005-05-09 10:33 PM)
_________________________
How to ask questions the smart way <-----------> Before you ask