mIRC Home    About    Download    Register    News    Help

Print Thread
why does this not work most times? (Timers) #169524 24/01/07 06:37 PM
Joined: Sep 2006
Posts: 43
M
McOwnage Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Sep 2006
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

Re: why does this not work most times? (Timers) [Re: McOwnage] #169526 24/01/07 07:36 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.
Re: why does this not work most times? (Timers) [Re: starbucks_mafia] #169544 24/01/07 10:00 PM
Joined: Sep 2006
Posts: 43
M
McOwnage Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Sep 2006
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

Last edited by McOwnage; 24/01/07 10:01 PM.
Re: why does this not work most times? (Timers) [Re: McOwnage] #169553 25/01/07 03:50 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
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

Re: why does this not work most times? (Timers) [Re: genius_at_work] #169557 25/01/07 05:39 AM
Joined: Sep 2006
Posts: 43
M
McOwnage Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Sep 2006
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

Re: why does this not work most times? (Timers) [Re: McOwnage] #169569 25/01/07 03:31 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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
Re: why does this not work most times? (Timers) [Re: Riamus2] #169570 25/01/07 03:53 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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.

Re: why does this not work most times? (Timers) [Re: DJ_Sol] #169646 26/01/07 03:06 PM
Joined: Dec 2006
Posts: 80
Scripto Offline
Babel fish
Offline
Babel fish
Joined: Dec 2006
Posts: 80
Yes, try the alias.


Scripto ---- Life is about the relationships. The correct code being: $replace($them,$you,$me)
Re: why does this not work most times? (Timers) [Re: Riamus2] #169660 26/01/07 04:46 PM
Joined: Sep 2006
Posts: 43
M
McOwnage Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Sep 2006
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