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 

variable set

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


Joined: 18 Nov 2002
Posts: 200
Location: Auckland, New Zealand

PostPosted: Sat Dec 10, 2005 11:36 pm    Post subject: variable set Reply with quote

Hi - is there a way to set a variable just once when the bot starts up, but then does not get set again when there's a rehash?

Thanks in advance.
_________________
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Sun Dec 11, 2005 12:40 am    Post subject: Reply with quote

no, but there is an easy workaround:
Code:
if {![info exists myvar]} {
   set myvar ""
}


Tip: this command can also be used to check if an array element exists.
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
NewzUK
Master


Joined: 18 Nov 2002
Posts: 200
Location: Auckland, New Zealand

PostPosted: Sun Dec 11, 2005 4:06 pm    Post subject: Reply with quote

thanks De Kus - will give that a try.
_________________
#Newsroom - Where News & Markets Connect
http://www.inewsroom.net
#Newsroom on irc.othernet.org
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
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