mIRC Home    About    Download    Register    News    Help

Print Thread
#145027 17/03/06 06:29 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
problem:

3rd IF doesnt work

Code:
  
on *:text:!slap*:#:{
  if ($2 !ison #) { /msg # i don't see anyone carrying that label, do you ? }
  elseif ($2 == $me) { /msg # I can't do that, i got only 4 hands ! | halt }
  elseif ($2 == $null) { /msg # usage: !slap <nickname> | halt }
  else { //describe $chan slaps $2 with $read $scriptdir\slaps.txt | halt }
}



any ideas why?


IceCapped
#145028 17/03/06 06:46 PM
Joined: Jul 2005
Posts: 25
U
Ameglian cow
Offline
Ameglian cow
U
Joined: Jul 2005
Posts: 25
Code:
on *:text:!slap*:#:{
  if (!$2) { /msg # usage: !slap <nickname> | halt }
  else {
    if ($2 !ison #) { /msg # i don't see anyone carrying that label, do you ? }
    elseif ($2 == $me) { /msg # I can't do that, i got only 4 hands ! | halt }
    else { //describe $chan slaps $2 with $read $scriptdir\slaps.txt | halt }
  }
}
 

#145029 17/03/06 06:48 PM
Joined: Mar 2005
Posts: 420
X
Fjord artisan
Offline
Fjord artisan
X
Joined: Mar 2005
Posts: 420
I would say the order of your if-else

Code:
on *:text:!slap*:#:{
  if ($2 == $null) { msg # usage: !slap <nickname> }
  elseif ($2 == $me) { msg # I can't do that, i got only 4 hands ! }
  elseif ($2 !ison #) { msg # i don't see anyone carrying that label, do you ? }
  else { describe $chan slaps $2 with $read $scriptdir\slaps.txt }
}  


No need for the /halt commands


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
#145030 17/03/06 06:48 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
thanks =)


IceCapped
#145031 17/03/06 07:14 PM
Joined: Jul 2005
Posts: 25
U
Ameglian cow
Offline
Ameglian cow
U
Joined: Jul 2005
Posts: 25
n.i. (not important) :tongue:

#145032 17/03/06 11:09 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
you mean "no problem" (i guess) :P

also thanks to xDaeMoN for his effort.


IceCapped
#145033 18/03/06 12:04 PM
Joined: Jul 2005
Posts: 25
U
Ameglian cow
Offline
Ameglian cow
U
Joined: Jul 2005
Posts: 25
hmm...
yes yes smile
my eng is very very very bad... frown


Link Copied to Clipboard