| View previous topic :: View next topic |
| Author |
Message |
helpme Voice
Joined: 08 May 2005 Posts: 17
|
Posted: Tue Feb 14, 2006 3:57 am Post subject: counter |
|
|
can you help me pls, after a .restart the counter begins from 0 -- sfda
| Code: | if {![file exists usersbny]} { close [open usersbny w+] }
if {![info exists usersbny]} {
set file [open usersbny r]
set usersbny [gets $file]
close $file
if {$usersbny == ""} { set usersbny 0 }
}
bind join - * bny_voice
proc bny_voice { nick uhost hand chan } {
global usersbny
incr usersbny
putquick "notice $nick :Hi $nick. There are $usersbny joins since 30.01.2006. Welcome to $chan!"
set file [open counter.txt w]
puts $file $usersbny
close $file
} |
|
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Wed Feb 15, 2006 12:58 pm Post subject: |
|
|
| Your first line is obviously blank then? |
|
| Back to top |
|
 |
|