mIRC Home    About    Download    Register    News    Help

Topic Options
#169524 - 24/01/07 06:37 PM why does this not work most times? (Timers)
McOwnage Offline
Ameglian cow

Registered: 29/09/06
Posts: 43
Code:
timerjoin69 0 10 $iif($me !ison #UNLOBBY,join $v2,timerjoin69 off)


sometimes the timer will stop but MOST times the timer will not

Top
#169526 - 24/01/07 07:36 PM Re: why does this not work most times? (Timers) [Re: McOwnage]
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
The $iif() is being evaluated when you set the timer so whether it stops or not is determined by whether you were in that channel at that time, not every ten seconds. To do that you need to prevent the $iif() from being evaluated like so:

Code:
timerjoin69 0 10 $!iif($me !ison #UNLOBBY,join $!v2,timerjoin69 off)
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top
#169544 - 24/01/07 10:00 PM Re: why does this not work most times? (Timers) [Re: starbucks_mafia]
McOwnage Offline
Ameglian cow

Registered: 29/09/06
Posts: 43
Originally Posted By: starbucks_mafia
The $iif() is being evaluated when you set the timer so whether it stops or not is determined by whether you were in that channel at that time, not every ten seconds. To do that you need to prevent the $iif() from being evaluated like so:

Code:
timerjoin69 0 10 $!iif($me !ison #UNLOBBY,join $!v2,timerjoin69 off)


got this error with that

$IIF($ME Unknown command
-
$IIF($ME Unknown command
-
$IIF($ME Unknown command
-
$IIF($ME Unknown command


Edited by McOwnage (24/01/07 10:01 PM)

Top
#169553 - 25/01/07 03:50 AM Re: why does this not work most times? (Timers) [Re: McOwnage]
genius_at_work Offline
Hoopy frood

Registered: 08/10/05
Posts: 1741
Using $!escaped identifiers in timers can be confusing. Try this instead:

Code:
//timerjoin69 0 10 $($iif($me !ison #UNLOBBY,join $v2,timerjoin69 off),0)



-genius_at_work

Top
#169557 - 25/01/07 05:39 AM Re: why does this not work most times? (Timers) [Re: genius_at_work]
McOwnage Offline
Ameglian cow

Registered: 29/09/06
Posts: 43
Originally Posted By: genius_at_work
Using $!escaped identifiers in timers can be confusing. Try this instead:

Code:
//timerjoin69 0 10 $($iif($me !ison #UNLOBBY,join $v2,timerjoin69 off),0)



-genius_at_work


Same thing
$IIF($ME Unknown command
-
$IIF($ME Unknown command

Top
#169569 - 25/01/07 03:31 PM Re: why does this not work most times? (Timers) [Re: McOwnage]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: NC, USA
Personally, I like aliases in timers better than escaping everything anyhow.

Code:
.timerjoin69 0 10 JoinChan

alias JoinChan {
  $iif($me !ison #UNLOBBY,join $v2,timerjoin69 off)
}
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#169570 - 25/01/07 03:53 PM Re: why does this not work most times? (Timers) [Re: Riamus2]
DJ_Sol Offline
Hoopy frood

Registered: 04/01/07
Posts: 1156
Loc: Seattle
I agree with Riamus completely. When I first started working with timers I found lots of problems when it was anything more than a simple command. I create an alias as well.

Top
#169646 - 26/01/07 03:06 PM Re: why does this not work most times? (Timers) [Re: DJ_Sol]
Scripto Offline
Babel fish

Registered: 31/12/06
Posts: 80
Loc: Michigan, Usa
Yes, try the alias.
_________________________
Scripto ---- Life is about the relationships. The correct code being: $replace($them,$you,$me)

Top
#169660 - 26/01/07 04:46 PM Re: why does this not work most times? (Timers) [Re: Riamus2]
McOwnage Offline
Ameglian cow

Registered: 29/09/06
Posts: 43
Originally Posted By: Riamus2
Personally, I like aliases in timers better than escaping everything anyhow.

Code:
.timerjoin69 0 10 JoinChan

alias JoinChan {
  $iif($me !ison #UNLOBBY,join $v2,timerjoin69 off)
}


Thanks that works GREAT

Top