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.
Old posts that have not been replied to for several years.
l
loze
Post
by loze » Mon May 20, 2002 5:33 pm
Code: Select all
...
regsub -all "</SONGTITLE>" $line "" line
set onairlat $line"
}
}
close $sock
}
bind pub -|- !onair pub:onairdisplay
proc pub:onairdisplay {nick uhand handle chan input} {
putserv "PRIVMSG $chan : Just nu sänder $onairdj med låten $onairlat"
}
I dont know what to do. It's something wrong on the $onair* variabels, Do i need the global... or what.. please help a tcl noob
Petersen
Owner
Posts: 685 Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK
Post
by Petersen » Mon May 20, 2002 6:05 pm
yes, you need to global the var. actually calling the proc that updates that variable from the bind proc would help too
l
loze
Post
by loze » Mon May 20, 2002 6:16 pm
Code: Select all
proc pub:onairdisplay {nick uhand handle chan input} {
global onairdj onairlat
putserv "PRIVMSG $chan : Just nu sänder $onairdj med låten $onairlat"
}
Doesn't work.. I have a timer thats update the variables every 10 seconds.
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Tue May 21, 2002 6:20 am
Besides using the global command in the proc where the var will be used, it is also needed in the proc that read it into the var (IE, the proc at the top of you post, where you can't see the top).
Note, you may want to consider removing the update timer, and move to updating only when the trigger is called. Allthough this would only be effective, if the trigger is used less than every 10 seconds.
l
loze
Post
by loze » Tue May 21, 2002 8:37 pm
thanks for the help..