Freefile is returning a zero value

Hello

For some reason when calling freefile() within a lotus script agent, the value returned is 0.

When this happens the script does not create/output to a file. Sometime it give different values (eg. 1 or 2) and it works ok.

Any ideas what could be causing this?

Subject: freefile is returning a zero value

There is a maximum of file that you can have open at the same time. This comes from the help:

If no more file numbers are available, an error is generated.

LotusScript limits the number of open files to 255. Depending on your operating system environment and the Lotus software you are running, the actual number of files that you can open may be 15 or less. See your product documentation for details.