PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: HiddenSniper on 15 March, 2004, 23:44:25

Title: A log
Post by: HiddenSniper on 15 March, 2004, 23:44:25
What do I write to make my bot create a log?
I'm sort of new at this so I need all the help I can get.
Title:
Post by: WooshMan on 16 March, 2004, 09:49:37
Have you written a bot then?  Or do you have a bot running written by someone else?

If it is written by yourself and depending on what it does you should be able to add a log part to the script quite easily.

If the script is by someone else, which one is it?

Woosh
Title:
Post by: [NL]trucker on 16 March, 2004, 11:08:58
HiddenSniper


2 options m8

1 post your script here so the scripters can have a look at it.

2  look at other scripts like logger
----------------------------------------------------
big guess from me
as far as i know you need to have a txtfle in scriptdir
then in your script you have to add  
txtfile=......log.txt

then you have to make a routine with writetofile()
----------------------------------------------------

this is what i saw in many scripts.
but you need to look for yourself.
Title:
Post by: HiddenSniper on 16 March, 2004, 12:55:40
I have a bot that I have written on my own, but it has no function even remotely to a log function, 'cause I don't know how to write it.
I just need you guys to write an example and explain it. Like the last reply... I don't know what writetofile() does, I can guess but I don't know for sure. =)
I also need to know how to use it in a function.
BTW is there a list of commands somewhere on the web?
I didn't even know there was such a thing as a writetofile()... =) It would be very helpful if someone made such a list if it doesn't exist.

If I doesn't make any sense so just post a reply and I'll try to explain better.
//HiddenSniper
Title:
Post by: tezlo on 16 March, 2004, 13:28:43
it does exist.. http://www.lua.org/manual/4.0/manual.html