mIRC Homepage
Posted By: _Marky_ noob if statement question - 23/12/02 10:19 AM
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?
Posted By: Malevolyn Re: noob if statement question - 23/12/02 11:44 AM
Looks right to me.
Posted By: _Marky_ Re: noob if statement question - 23/12/02 11:55 AM
are there any tutorials which cover if statements ?
Posted By: Malevolyn Re: noob if statement question - 23/12/02 12:02 PM
Yeah, just look around. Myself, I just learned from the help file, though.
Posted By: Poppy Re: noob if statement question - 23/12/02 05:38 PM
You'll find some pretty good tutorials here. smile
Posted By: _Marky_ Re: noob if statement question - 23/12/02 11:19 PM
yeah i found some
thanks anyways smile
Posted By: Hammer Re: noob if statement question - 24/12/02 01:34 AM
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) }
Posted By: _Marky_ Re: noob if statement question - 24/12/02 02:59 AM
yeah i found that i had made that mistake after readin some tutorials

but thanks for that anyway smile
© mIRC Discussion Forums