mIRC Home    About    Download    Register    News    Help

Print Thread
#167837 31/12/06 01:31 PM
Joined: Mar 2006
Posts: 25
T
tekano Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Mar 2006
Posts: 25
I'm trying to find a way to check if the person's vhost is already located in the variable.

Code:
if ($numtok($($+(%,$2),2),32) == 2) {
    set $($+(%,$2),1) $addtok($($+(%,$2),2),$address($nick,2),32)
  } 


This works, but here is the what I'm trying to do.

Code:
if ($numtok($($+(%,$2),2),32) == 2) {
  if ($gettok($($+(%,$2),2),32) isin $address($nick,2)) {
    msg $chan You already voted for this person, $nick
  }
  else {
    set $($+(%,$2),1) $addtok($($+(%,$2),2),$address($nick,2),32)
  }
}


and this doesn't work

I get this error:
* Too few parameters: $gettok (line 12, voices.mrc)
wich is this line:
if ($gettok($($+(%,$2),2),32) isin $address($nick,2)) {

Last edited by tekano; 31/12/06 01:36 PM.
tekano #167842 31/12/06 02:11 PM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
The syntax for $gettok is $gettok(text,N,C). You're missing the N parameter. Check the examples in the help file.


* cold edits his posts 24/7
cold #167843 31/12/06 02:40 PM
Joined: Mar 2006
Posts: 25
T
tekano Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Mar 2006
Posts: 25
ah yes ofcourse, thanks


Link Copied to Clipboard