Del()
..()
world.log = file("saves/log.txt")</DM
Doesnt save what users say into a log that I or the person running it can view...Can anyone help? Thanks in advance!
-Crio
ID:148519
Jan 13 2003, 1:04 pm
|
|
For some reason my code:
|
In response to Nova2000
|
|
AHHH....It doesnt work...you would think that would work...
|
In response to Koolguy900095
|
|
Nova actually had the best idea in my opinion. I've never had much success with saving the world.log to an actual file. Besides, anything sent to the file will also go the host, so it'd more likely spam him/her. I'd suggest something like this:
var/Log_File Note: I haven't tested this, but it should more or less work =P By the way, your main problem was that you used world.log = file(blah) in your world.del(). I assume you were expecting the contents of world.log to transfer into the file. That won't happen. If you wanted to do that, I'd suggest using fcopy(). Otherwise, just define your log file and write to it when needed. |
In response to sapphiremagus
|
|
it works
|
In response to Zlegend2
|
|
How would i make it so when it creates the log it puts the date so i can have dif logs for different days...
|
In response to Koolguy900095
|
|
instead of
Log_File = file("saves/log.txt")
Log_File = file("saves/log[time2text(world.realtime,"DD MM YY")].txt") [EDIT] I have a question. Would it be world.realtime/10 since the time is in ticks? or maybe it doesnt matter for date? |
In response to Koolguy900095
|
|
Working on a code for this, but what you want is world.realtime, look it up.
|
In response to Weedman
|
|
Weedman wrote:
instead of
Log_File = file("saves/log.txt")
Log_File = file("saves/log[time2text(world.time,"DD MM YY")].txt") Use world.realtime, not world.time... world.time is the time server has been running... world.realtime is the actual date. |
I couldn't firuge this one out either, and gave up on the forums. I got so angry, I did this:
And that worked for me, so...