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.

snippet codes for timer error

Old posts that have not been replied to for several years.
Locked
A
AW

snippet codes for timer error

Post by AW »

Hi ppslim,

i found your snippet codes for timer error, is it possible if you can help to make them work, i think that will be a great help for all users, since timer errors are pain..... i got a timer error
<eggy> [10:16] Tcl error in script for 'timer121047':
<eggy> [10:16] invalid command name "FS"
i tried these codes but didn't work....i will appreciate for you help

rename timer _timer
rename utimer _utimer
proc timer {time cmd} {
_timer $time [list debug_timer t $cmd]
}
proc utimer {time cmd} {
_utimer $time [list debug_timer u $cmd]
}
proc debug_timer {t cmd} {
if {[catch $cmd a]} {
if {$t = "t"} {
putlog "Timer error: [lindex $cmd 0] : $a"
} else {
putlog "Utimer error: [lindex $cmd 0] : $a"
}
}
}

thanks
regards
AW
A
AW

Post by AW »

Hi, Can someone plz help me to fix these codes, because this will be very helpfull for all users, to rid timer errors.

Thanks
regards
AW
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

This will not rid you of timer problems. Instead of the normal error stating only the timer number, it will instead display the proc that caused the problem, and the error message.

To get it functioning, place it in a empty file and save it in the scripts dir.

Load the script before any other scripts.

From then on, any timer issues should give meaningful errors.
A
AW

Post by AW »

Hi ppslim, sorry i wasn't able to join this forum, but i did exactly you said, cos i wanna display the proc that caused the problem and the error message.

i have placed this in a empty file and saved as a text file and placed in a script dir, then loaded the script before anyother script, i mean on top of other scripts.
then restarted the bot, but i am getting all these error msgs
<Ta> [02:04] Tcl error in script for 'timer44421':
<Ta> [02:04] syntax error in expression "$t = "t""
<Ta> [02:04] Tcl error in script for 'timer44420':
<Ta> [02:04] syntax error in expression "$t = "t""
<Ta> [02:04] Tcl error in script for 'timer44419':
<Ta> [02:04] syntax error in expression "$t = "t""
<Ta> [02:04] Tcl error in script for 'timer44417':
<Ta> [02:04] syntax error in expression "$t = "t""
<Ta> [02:04] Tcl error in script for 'timer44422':
<Ta> [02:04] syntax error in expression "$t = "t""

i'll appreciate for your kind help
thanks
regards
aw
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

In the timer script you have saved, locate the line "if {$t = "t"} {" and change the = to a ==.
A
AW

Post by AW »

Thanks ppslim, this error is gone, but now i see this one
[23:27] Utimer error: incr : can't read "sl_bmqueue": no such variable

i think its coming from netbots.tcl?
Thanks
regards
AW
User avatar
slennox
Owner
Posts: 593
Joined: Sat Sep 22, 2001 8:00 pm
Contact:

Post by slennox »

That is a sentinel.tcl error. What version are you using?
A
AW

Post by AW »

Hi slennox,

i am using netbots4.09 (# netbots.tcl v4.09 (1 April 2002)

Thanks,
regards
AW
User avatar
slennox
Owner
Posts: 593
Joined: Sat Sep 22, 2001 8:00 pm
Contact:

Post by slennox »

The code appears to be fine and I don't recall any other reports of the problem. Perhaps there's some strange problem with your bot.
A
AW

Post by AW »

i had upgraded eggdrop1.6.10 to eggdrop1.6.12, plus i had reloaded netbots4.09..
so any advise?? plz

thanks
regards
AW
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

AW wrote:Thanks ppslim, this error is gone, but now i see this one
[23:27] Utimer error: incr : can't read "sl_bmqueue": no such variable

i think its coming from netbots.tcl?
Thanks
regards
AW
Just to let you know, this is exactly what you should be seeing.

The script above is designed to output this information (which shows some meaningful details), rather than the normal "error in timer timer514" stuff.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Hey ppslim, just one more modification you might want to make is to check if _timer and _utimer already exist (e.g. on rehash) so that you don't get an error trying to overwrite them.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

It was never designed as a full script, just a quick hack, to locate a problem.

I have made changes to it, including those sugested, as I am including it in a set of files I use for coding.

I am sick of doing quick hacks on any of my own scripts, using these tool scripts, I hope to code a release grade script in one go.
Locked