ID:2243901
 
(See the best response by Nadrew.)
Does file() not support folder paths as part of the file name? E.g.:

log = file("filepath/file.txt")


So far I've been unsuccessful in doing this. Figured I'd ask and make sure and see if anyone has any workarounds in mind.

For the record, the purpose of this is to log run-time errors in a sub-folder by date. Doesn't seem possible if this paths cannot be specified in a file() string though (would be disappointing since going through Dream Daemon for errors is extremely tedious with the small box 'n all).

Thanks.
Where are you setting it? Have you tried it without file()? I've always had weird issues using file() with world.log, despite the reference example. I've always just set it to a string and it's always worked for me.

You'll want to be setting it at runtime, not compile-time.
In response to Nadrew
I'm setting it at the beginning of world/New(), even before default behavior is called (though the order made no difference). Using a plain string produced the same results (no folder or file being created).
Does it work correctly if you do it WITHOUT the folder or use Dream Daemon's -log parameter?
In response to Nadrew
It does (both using file() and plain text).
Best response
Okay, I did some further testing. It appears it can't CREATE new directories, simply write to existing ones. I'll post a bug report for ya :)


If you create the directory beforehand (You can workaround by writing a file to the directory and deleting it) it'll work properly.
In response to Nadrew
I'll do that then. Appreciate your time.