mIRC Home    About    Download    Register    News    Help

Print Thread
#3178 23/12/02 10:19 AM
_
_Marky_
_Marky_
_
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?

M
Malevolyn
Malevolyn
M
Looks right to me.

_
_Marky_
_Marky_
_
are there any tutorials which cover if statements ?

M
Malevolyn
Malevolyn
M
Yeah, just look around. Myself, I just learned from the help file, though.

Joined: Dec 2002
Posts: 817
P
Hoopy frood
Offline
Hoopy frood
P
Joined: Dec 2002
Posts: 817
You'll find some pretty good tutorials here. smile

_
_Marky_
_Marky_
_
yeah i found some
thanks anyways smile

Joined: Dec 2002
Posts: 1,253
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,253
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) }

_
_Marky_
_Marky_
_
yeah i found that i had made that mistake after readin some tutorials

but thanks for that anyway smile


Link Copied to Clipboard