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 » Tue May 21, 2002 8:39 pm
what wrong with this?
Code: Select all
utimer 1 onair
proc onair {} {
utimer 1 pub:onair
utimer 10 onair
}
Anyone with any different solution if this not work??
Petersen
Owner
Posts: 685 Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK
Post
by Petersen » Tue May 21, 2002 9:35 pm
nothing particularily wrong with it per se. though i wouldnt go making utimers like that without checking that a utimer isnt already running for it first (ie, every time you rehash that script, you're gonna duplicate the timer). also, i suspect you're calling pub:onair with too few arguments
stdragon
Owner
Posts: 959 Joined: Sun Sep 23, 2001 8:00 pm
Contact:
Post
by stdragon » Wed May 22, 2002 2:48 am
Code: Select all
if {![info exists mytimer]} {
set mytimer [utimer 1 onair]
}
proc onair ...
That will keep your timer from being executed multiple times on .rehash (the problem Petersen pointed out).
l
loze
Post
by loze » Wed May 22, 2002 3:59 am
i suspect you're calling pub:onair with too few arguments
What do you mean with that? Do I need more in the { and } tags after proc onair.. ??
<font size=-1>[ This Message was edited by: loze on 2002-05-22 01:59 ]</font>
Petersen
Owner
Posts: 685 Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK
Post
by Petersen » Wed May 22, 2002 8:39 am
no, you defined proc pub:onair as something like proc pub:onair {nick uhost hand chan arg} {...
thus if you try and call it like you just did, its gonna error cos you're not passing 5 variables to it like you defined.
l
loze
Post
by loze » Wed May 22, 2002 11:35 am
My pub:onair look like this:
Code: Select all
proc pub:onair {nick uhand handle chan input} {
global onairdj onairlat
set sock [socket ...
I have 5 variabals in it. And it not updates.. Its only work when im use !on
I and svahn can't find the error.
stdragon
Owner
Posts: 959 Joined: Sun Sep 23, 2001 8:00 pm
Contact:
Post
by stdragon » Wed May 22, 2002 5:32 pm
proc onair {} {
utimer 1 pub:onair
utimer 10 onair
}
Delete the line that says "utimer 1 pub:onair"
l
loze
Post
by loze » Wed May 22, 2002 6:17 pm
Why? I did change the timer "thing" to..
Code: Select all
bind pub -|- !onair pub:onairdisplay
if {![info exists mytimer]} {
set mytimer [utimer 1 onair]
}
proc onair {nick uhand handle chan input} {
global onairdj onairlat
utimer 10 onair
...
whats wrong with this one?
It fills like I never will fix it.
l
loze
Post
by loze » Wed May 22, 2002 6:31 pm
I wonder if maybe utimer doesnt work in v1.6.10? No one of my timers doesnt work. Just a thought..
Petersen
Owner
Posts: 685 Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK
Post
by Petersen » Wed May 22, 2002 6:55 pm
as i keep saying, you're calling the proc with too few arguments. all you're gonna get is something like TCL error in script for 'timer2222': no value given for parameter "nick" to "onair"
svahn
Voice
Posts: 19 Joined: Sun May 19, 2002 8:00 pm
Location: Sweden
Contact:
Post
by svahn » Wed May 22, 2002 7:11 pm
Code: Select all
proc onair {} {
utimer 10 onair
global onairdj onairlat
Something like that.
l
loze
Post
by loze » Wed May 22, 2002 7:48 pm
thank you all for the help..
Its works with svahn's ide