mIRC Home    About    Download    Register    News    Help

Print Thread
why does this not work most times? (Timers) #169524
24/01/07 06:37 PM
24/01/07 06:37 PM
Joined: Sep 2006
Posts: 43
M
McOwnage Offline OP
Ameglian cow
McOwnage  Offline OP
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
24/01/07 07:36 PM
Joined: Dec 2002
Posts: 2,962
Norwich, UK
S
starbucks_mafia Offline
Hoopy frood
starbucks_mafia  Offline
Hoopy frood
S

Joined: Dec 2002
Posts: 2,962
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.
Re: why does this not work most times? (Timers) [Re: starbucks_mafia] #169544
24/01/07 10:00 PM
24/01/07 10:00 PM
Joined: Sep 2006
Posts: 43
M
McOwnage Offline OP
Ameglian cow
McOwnage  Offline OP
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
25/01/07 03:50 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
genius_at_work  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
25/01/07 05:39 AM
Joined: Sep 2006
Posts: 43
M
McOwnage Offline OP
Ameglian cow
McOwnage  Offline OP
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
25/01/07 03:31 PM
Joined: Oct 2004
Posts: 8,327
MA, USA
Riamus2 Offline
Planetary brain
Riamus2  Offline
Planetary brain

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

Joined: Jan 2007
Posts: 1,156
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.

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

Joined: Dec 2006
Posts: 80
Michigan, Usa
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
26/01/07 04:46 PM
Joined: Sep 2006
Posts: 43
M
McOwnage Offline OP
Ameglian cow
McOwnage  Offline OP
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