mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2004
Posts: 18
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Sep 2004
Posts: 18
Perhaps is an old subject, but I have not found nothing in this forum, I request excuses for that reason, and for my english. Sorry.

Code:
 
set %value 50000

alias pr1 { 
.timerpr1 0 $calc(%value * 60) echo -a TIEMPO UNO
.timer 1 5 echo -a TIEMPO DOS 
}  

alias pr2 timerpr1 off
 


With values between 35791~71582 the first timer works incorrectly. And show the ECHO every 1 second.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Simply (maybe simply) put the delay in seconds is recorded in milliseconds into a 32bit signed integer.

/timer c d cmd

c = cycles (number of times to do something, 0 = infinite)
d = delay between cycles in seconds Valid values for the timer are 0 to 2,147,483

After that it all goes fruity, the exact number is 2,147,483,648 millseconds this is the moment you have exceeded the value you can store in a 32bit signed number.

This happens to be the same problem as what Win9x had with falling over in 24days 20hrs 31mins 24secs, after switch on, the 32bit signed number that stored milliseconds since startup wasnt large enough anymore and the value rolled over into the negitives.

Joined: Sep 2004
Posts: 18
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Sep 2004
Posts: 18
OK, thanks for the explanation, is understood. I suggest two proposals:
Include the explanation in the file mirc.hlp.
Create a new error message, ej. "Timer delay exceeded".
Thank you very much again.

Joined: Sep 2004
Posts: 200
I
Fjord artisan
Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
i would rather have it make a timer to make a nother timer ect til it reaches the wanted amount of time

:tongue:

i.e:

if the limit was 50 secs:

if you did /timer 5 51 echo -a hello
it would make the timer be: /timer 5 50 /timer 1 1 /echo -a hello

Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
Unfortunately that method would force early avaluation of any variables or identifiers.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You can always do it with an alias if you need to use multiple timers like that with variables.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard