The fopen instruction in a SIM Scripts return always 0. The code is:
fopen fn, "TransLog.txt", append
if fn = 0
errormessage "FN: ", fn, ", ", @FILE_ERRSTR, "-", @FILE_ERRNO
exitcontinue
else
format lineaMsg as "This is a TEST message"
fWriteLn fn, lineaMsg
fclose fn
endif
I suppose the fopen should return a valid file handle, since is append. In the default micros directory. But a 0 file number is always returned.
Any help?
p.d. Sorry but the text lose the original indentation
fopen fn, "TransLog.txt", append
if fn = 0
errormessage "FN: ", fn, ", ", @FILE_ERRSTR, "-", @FILE_ERRNO
exitcontinue
else
format lineaMsg as "This is a TEST message"
fWriteLn fn, lineaMsg
fclose fn
endif
I suppose the fopen should return a valid file handle, since is append. In the default micros directory. But a 0 file number is always returned.
Any help?
p.d. Sorry but the text lose the original indentation