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.

Problem With timer

Old posts that have not been replied to for several years.
Locked
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Problem With timer

Post by ^DooM^ »

Is it just me or is everyone else running 1.6.15 having trouble with timers?

Code: Select all

timer 2 "display_message"
That should run the procedure display_message every 2 minutes or so i thought.

on 2 bots i have tried it does the first message fine then kills the timer.

some feedback would be appreciated.

^DooM^ :wink:
Last edited by ^DooM^ on Tue Sep 16, 2003 1:39 pm, edited 1 time in total.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Re: Problem With timer

Post by strikelight »

^DooM^ wrote:Is it just me or is everyone else running 1.6.15 having trouble with timers?

Code: Select all

timer 2 "display_message"
That should run the procedure display_message every 2 minutes or so i thought.

some feedback would be appreciated.

^DooM^ :wink:
No, it will call the "display_message" proc once after 2 minutes and stop,
unless inside the "display_message" proc there is another timer call to itself.

for example:

Code: Select all

# make sure we don't spawn more timers upon rehashes
if {![info exists timer_set]} {
  set timer_set [timer 2 "proc_to_call"]
}
proc proc_to_call {} {
  ... does stuff ...
  timer 2 proc_to_call ;# calls itself again in 2 minutes
}
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

ahh of course im thinking too much along the lines of timers in my IRC script. :oops:

Thx again strikelight :wink:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
Locked