mIRC Homepage
Posted By: Jyang Problem with timers - 19/01/08 07:43 PM
Code:
alias start start2 $chan $me
alias start2 timer $+ $1 1 2 begin
alias begin echo -a Triggered: $1

This script doesn't work, and I believe it's a bug in mIRC. I narrowed the script I was using to the three lines, but it still doesn't work.
When typing /start, it'll display "* Timer #chan activated", but after 2 seconds, it will not say "* Timer #chan halted". Instead, the script won't do anything.

$timer(#Chan).com = begin
$timer(#Chan).secs = 0 (After the first 2 seconds)

Thanks

EDIT:
Quote:

Tried the code I posted, it worked.

Here's the raw code I used, that didn't work. It probably has something to do with the alias name.
Code:
alias start unostart $chan $me
alias unostart timer $+ $1 1 30 unobegin $2
alias unobegin echo -a Triggered: $1

Posted By: hixxy Re: Problem with timers - 19/01/08 07:58 PM
I can't reproduce this.

Not connected:

Code:
* Timer hixxy activated
-
Triggered:
-
* Timer hixxy halted


Connected:

Code:
* Timer #hixxytest activated
Triggered:
* Timer #hixxytest halted
Posted By: RoCk Re: Problem with timers - 19/01/08 08:16 PM

Can't reproduce it here either with 6.31

* Timer #rock- activated
Triggered:
* Timer #rock- halted
* Disconnected
* Timer #rock- activated

Triggered:
* Timer #rock- halted
Posted By: starbucks_mafia Re: Problem with timers - 19/01/08 08:18 PM
You might want to make sure you don't have a /timer alias that's causing this. $isalias(timer) will return $true if you do.

The only other thing I can think of that would stop the timer without telling you is if you disconnect from the server - but then $timer(#chan) would return $null.
Posted By: Jyang Re: Problem with timers - 19/01/08 08:25 PM
Tried the code I posted, it worked.
Here's the raw code I used, that didn't work. It probably has something to do with the alias name.
Code:
alias start unostart $chan $me
alias unostart timer $+ $1 1 30 unobegin $2
alias unobegin echo -a Triggered: $1
Posted By: RoCk Re: Problem with timers - 19/01/08 08:32 PM

Well it's taking longer because the timer delay is 28 seconds longer than the first one, but it's still working here.

* Timer #rock- activated
Triggered: RoCk-
* Timer #rock- halted
* Disconnected
* Timer #rock- activated

Triggered: RoCk-
* Timer #rock- halted
Posted By: Jyang Re: Problem with timers - 19/01/08 08:38 PM
I unloaded all my scripts and tried. Seems to work fine now. Probably one of my scripts affecting it, even if $isalias(timer) = $false.

Anyway, thanks.
Posted By: RoCk Re: Problem with timers - 19/01/08 08:39 PM

Maybe you have another alias named unostart or unobegin ?
Posted By: Joeyexa Re: Problem with timers - 19/01/08 10:09 PM
no idea what you're talking about
Posted By: DJ_Sol Re: Problem with timers - 22/01/08 07:54 PM
Whats the format of the channel names on the server you chat on?

Is it #Channel or %#Channel?
© mIRC Discussion Forums