ID:176469
 
How do I get the world.log to goto a file? I have world.log = file("theLog.txt") but that does nothing, it still outputs to the screen! And there is no log file!
you can try this:
world/New()
world.log = file("theLog.txt")
..()

[EDIT]
lol sorry, I forget that sometimes
In response to Weedman (#1)
Weedman wrote:
you can try this:
> world/New()
> world.log = file(theLog.txt)
> ..()
>

That doesn't work. theLog.txt is an undefined var.
In response to Nova2000 (#2)
Try putting quotes around it.
In response to Nadrew (#3)
Nadrew wrote:
Try putting quotes around it.

That's what I had in the first post, that didn't work. Single quotes claim the file doesnt exist, which is bull. It's in the same directory as everything else.
In response to Nova2000 (#4)
Nova2000 wrote:
Nadrew wrote:
Try putting quotes around it.

That's what I had in the first post, that didn't work. Single quotes claim the file doesnt exist, which is bull. It's in the same directory as everything else.

Double quotes. That's what the file() proc is for: To convert a double-quote form to an actual file object.

Lummox JR
In response to Lummox JR (#5)
double quotes dont work....if they do why dont:

world.log = file("saves/log.txt")


work?