mIRC Homepage
Posted By: jacksparrow2 help on this - 13/04/04 02:01 AM
on 1:INPUT:#: {
if $1 isin op deop voice {
if $1 == op { .echo -s 15 X te ha subido de Op | .mode # +o $2 }
elseif $1 == dvoice { .mode # -v $2 }
elseif $1 == deop { .echo -s 12 X te ha subido de Op | .mode # -o $2 }
elseif $1 == voice { .echo -s 12 X te ha dado Voice | .mode # +v $2 }


haltdef
}
}


the elseif $1 devoice its wrong how can i do i t

thnx

Posted By: Zeusbwr Re: help on this - 13/04/04 02:17 AM
well just starting, you said "devoice" and your script says "dvoice".
Posted By: Zeusbwr Re: help on this - 13/04/04 02:22 AM
i think this is your problem.
Code:
 
if $1 isin op deop voice {
 

your looking for a devoice command, and devoice isnt in "op deop voice"

you can do this and it should work, assuming this is the problem.

Code:
if $1 isin op deop voice [color:red]devoice[/color] {
  
Posted By: jacksparrow2 Re: help on this - 13/04/04 12:32 PM
thnx my pal
Posted By: AnhTraiSG Re: help on this - 13/04/04 03:03 PM
Your code is missing dvoice in the IF sentence, so after the fist IF condition your script is stoped. This is the script you want:
Code:
on 1:INPUT:#: {
   if $1 isin op deop voice dvoice {
      if $1 == op { .echo -s 15 X te ha subido de Op | .mode # +o $2 }
      elseif $1 == dvoice { .mode # -v $2 }
      elseif $1 == deop { .echo -s 12 X te ha subido de Op | .mode # -o $2 }
      elseif $1 == voice { .echo -s 12 X te ha dado Voice | .mode # +v $2 }
      haltdef
   }
} 

Posted By: Zeusbwr Re: help on this - 13/04/04 10:22 PM
fyi, if you want you could also just do:
Code:
   if $1 isin deop devoice {
 

i havent tested that but it SHOULD work, because "op" is in "deop" and "voice" is in "devoice". and if your ganna get more complicated in your if statement, like dif if statements catching dif words, id go with tokens. somethin like
Code:
if $istok(op.deop.voice.devoice,$1,46) == $true {
 

but thats only if you need it, gl smile
© mIRC Discussion Forums