mIRC Home    About    Download    Register    News    Help

Topic Options
#193464 - 19/01/08 07:43 PM Problem with timers
Jyang Offline
Pikka bird

Registered: 03/11/07
Posts: 19
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



Edited by Jyang (19/01/08 08:25 PM)

Top
#193466 - 19/01/08 07:58 PM Re: Problem with timers [Re: Jyang]
hixxy Offline
Hoopy frood

Registered: 06/09/05
Posts: 2876
I can't reproduce this.

Not connected:

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


Connected:

Code:
* Timer #hixxytest activated
Triggered:
* Timer #hixxytest halted

Top
#193472 - 19/01/08 08:16 PM Re: Problem with timers [Re: Jyang]
RoCk Offline
Hoopy frood

Registered: 16/12/02
Posts: 2009

Can't reproduce it here either with 6.31

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

Triggered:
* Timer #rock- halted

Top
#193473 - 19/01/08 08:18 PM Re: Problem with timers [Re: Jyang]
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
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.
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top
#193474 - 19/01/08 08:25 PM Re: Problem with timers [Re: RoCk]
Jyang Offline
Pikka bird

Registered: 03/11/07
Posts: 19
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

Top
#193475 - 19/01/08 08:32 PM Re: Problem with timers [Re: Jyang]
RoCk Offline
Hoopy frood

Registered: 16/12/02
Posts: 2009

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

Top
#193476 - 19/01/08 08:38 PM Re: Problem with timers [Re: RoCk]
Jyang Offline
Pikka bird

Registered: 03/11/07
Posts: 19
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.

Top
#193477 - 19/01/08 08:39 PM Re: Problem with timers [Re: Jyang]
RoCk Offline
Hoopy frood

Registered: 16/12/02
Posts: 2009

Maybe you have another alias named unostart or unobegin ?

Top
#193488 - 19/01/08 10:09 PM Re: Problem with timers [Re: Jyang]
Joeyexa Offline
Pikka bird

Registered: 18/01/08
Posts: 16
Loc: Atlanta, Georgia USA
no idea what you're talking about

Top
#193626 - 22/01/08 07:54 PM Re: Problem with timers [Re: Joeyexa]
DJ_Sol Offline
Hoopy frood

Registered: 04/01/07
Posts: 1156
Loc: Seattle
Whats the format of the channel names on the server you chat on?

Is it #Channel or %#Channel?

Top