mIRC Home    About    Download    Register    News    Help

Print Thread
#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?

Joined: Dec 2002
Posts: 10
M
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
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 ?

Joined: Dec 2002
Posts: 10
M
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
Joined: Dec 2002
Posts: 843
P
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.
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

Joined: Dec 2002
Posts: 1,321
H
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
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


Link Copied to Clipboard