mIRC Homepage

why does this not work most times? (Timers)

Posted By: McOwnage

why does this not work most times? (Timers) - 24/01/07 06:37 PM

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


sometimes the timer will stop but MOST times the timer will not
Posted By: starbucks_mafia

Re: why does this not work most times? (Timers) - 24/01/07 07:36 PM

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)
Posted By: McOwnage

Re: why does this not work most times? (Timers) - 24/01/07 10:00 PM

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
Posted By: genius_at_work

Re: why does this not work most times? (Timers) - 25/01/07 03:50 AM

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
Posted By: McOwnage

Re: why does this not work most times? (Timers) - 25/01/07 05:39 AM

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
Posted By: Riamus2

Re: why does this not work most times? (Timers) - 25/01/07 03:31 PM

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)
}
Posted By: DJ_Sol

Re: why does this not work most times? (Timers) - 25/01/07 03:53 PM

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.
Posted By: Scripto

Re: why does this not work most times? (Timers) - 26/01/07 03:06 PM

Yes, try the alias.
Posted By: McOwnage

Re: why does this not work most times? (Timers) - 26/01/07 04:46 PM

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
© 2019 mIRC Discussion Forums