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.

global variables don't work

Help for those learning Tcl or writing their own scripts.
User avatar
krimson
Halfop
Posts: 86
Joined: Wed Apr 19, 2006 8:12 am

Post by krimson »

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
d
darton
Op
Posts: 155
Joined: Sat Jan 21, 2006 11:03 am

Post by darton »

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.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

@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
d
darton
Op
Posts: 155
Joined: Sat Jan 21, 2006 11:03 am

Post by darton »

I have shortened the script above a little bit ;)
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.
Post Reply