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 

global variables don't work
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
krimson
Halfop


Joined: 19 Apr 2006
Posts: 86

PostPosted: Wed Aug 09, 2006 4:24 pm    Post subject: Reply with quote

it's true that his first post was not so clear, but still, for that matter you'd need to use $botnick instead of $nick
Back to top
View user's profile Send private message Send e-mail
darton
Op


Joined: 21 Jan 2006
Posts: 155

PostPosted: Wed Aug 09, 2006 4:59 pm    Post subject: Reply with quote

Thank you all for your answers.
By the way, its not a bot who types !afk, its a normal user and if that one types !afk my bot says that that user ($nick) is afk.
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Aug 09, 2006 5:19 pm    Post subject: Reply with quote

@krimson: Ahh... very true, $nick is the desired nick, while $botnick is the actual.. keep mixing those up all the time :/ *bows before master*

@darton: Then there would be no use to make any variables global at all, go with krimson's example instead or put the checks directly inside the first proc...
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
darton
Op


Joined: 21 Jan 2006
Posts: 155

PostPosted: Wed Aug 09, 2006 5:27 pm    Post subject: Reply with quote

I have shortened the script above a little bit Wink
So its not the $nick directly who says !afk. The bot who is $nick reproduces everything from a game, so there are people in the game who type !afk. So its [lindex [split $arg] 0] who says !afk.
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
Goto page Previous  1, 2
Page 2 of 2

 
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