egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

counter

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
helpme
Voice


Joined: 08 May 2005
Posts: 17

PostPosted: Tue Feb 14, 2006 3:57 am    Post subject: counter Reply with quote

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
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Wed Feb 15, 2006 12:58 pm    Post subject: Reply with quote

Your first line is obviously blank then?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber