This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

how to clear file contain every 1 day?

Old posts that have not been replied to for several years.
Locked
u
up^to^you

how to clear file contain every 1 day?

Post by up^to^you »

bind time - * * * tgwtf
proc tgwtf {min hour day month year} {
if {[file exists "follow.txt"]} {
set follow.txt 0

is this code to make my bot clear everything (data, texts. etc) in a file every 24 hours?

thx for every help :)
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

No, first look at the syntax for the time bind. Yours is all wrong (Hint: the mask parameter is only one parameter).

Also, set follow.txt 0 isn't going to reset the file. To reset it, open it in write mode (check the "open" man page at www.tcl.tk/man for info on how to make it use write mode).
Locked