mIRC Home    About    Download    Register    News    Help

Print Thread
noob if statement question #3178 23/12/02 10:19 AM
Joined: Dec 2002
Posts: 15
_
_Marky_ Offline OP
Pikka bird
OP Offline
Pikka bird
_
Joined: Dec 2002
Posts: 15
umm im not very good at these so please dont make fun of me
but i was wondering if this is right:

Code:
alias autoawaycheck {
  if ($idle > %away.aatime) {
   if (%away.silent==on) { quietaway autoaway after $duration(%away.aatime) }
    else { setaway autoaway after $duration(%away.aatime) }
    .timer(autoaway) off
  }
}
  



can you see if ive done anything wrong?

Re: noob if statement question #3179 23/12/02 11:44 AM
Joined: Dec 2002
Posts: 10
M
Malevolyn Offline
Pikka bird
Offline
Pikka bird
M
Joined: Dec 2002
Posts: 10
Looks right to me.


--------------

~ Malevolyn - Script Guru
Current Projects:
BadCRC IRC 2002-2003
concepts
Re: noob if statement question #3180 23/12/02 11:55 AM
Joined: Dec 2002
Posts: 15
_
_Marky_ Offline OP
Pikka bird
OP Offline
Pikka bird
_
Joined: Dec 2002
Posts: 15
are there any tutorials which cover if statements ?

Re: noob if statement question #3181 23/12/02 12:02 PM
Joined: Dec 2002
Posts: 10
M
Malevolyn Offline
Pikka bird
Offline
Pikka bird
M
Joined: Dec 2002
Posts: 10
Yeah, just look around. Myself, I just learned from the help file, though.


--------------

~ Malevolyn - Script Guru
Current Projects:
BadCRC IRC 2002-2003
concepts
Re: noob if statement question #3182 23/12/02 05:38 PM
Joined: Dec 2002
Posts: 843
P
Poppy Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: Dec 2002
Posts: 843
You'll find some pretty good tutorials here. smile


Never compare yourself to others - they're more screwed up than you think.
Re: noob if statement question #3183 23/12/02 11:19 PM
Joined: Dec 2002
Posts: 15
_
_Marky_ Offline OP
Pikka bird
OP Offline
Pikka bird
_
Joined: Dec 2002
Posts: 15
yeah i found some
thanks anyways smile

Re: noob if statement question #3184 24/12/02 01:34 AM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Your problem is in your second IF condition:
  • if (%away.silent==on) { quietaway autoaway after $duration(%away.aatime) }
unless you happen to have a variable named %away.silent==on, which is a valid variable name. Surround the == with spaces as you did the > in the previous IF condition.
  • if (%away.silent == on) { quietaway autoaway after $duration(%away.aatime) }


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Re: noob if statement question #3185 24/12/02 02:59 AM
Joined: Dec 2002
Posts: 15
_
_Marky_ Offline OP
Pikka bird
OP Offline
Pikka bird
_
Joined: Dec 2002
Posts: 15
yeah i found that i had made that mistake after readin some tutorials

but thanks for that anyway smile