mIRC Home    About    Download    Register    News    Help

Print Thread
#189649 10/11/07 12:50 PM
Joined: Oct 2007
Posts: 92
N
Babel fish
OP Offline
Babel fish
N
Joined: Oct 2007
Posts: 92
Code:
on *:op:#:{
  if ($istok(%master,$opnick,44) hello master cronicman
}


Quote:
%master = cronicman



/if: invalid format

Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
You miss a closing bracket.

Code:
on *:op:#:{
  if ($istok(%master,$opnick,44)) { msg $opnick hello master cronicman }
}

Joined: Oct 2007
Posts: 92
N
Babel fish
OP Offline
Babel fish
N
Joined: Oct 2007
Posts: 92
still gives me

Quote:
/if: invalid format



Quote:
oh checked on help file the token and text is misplaced.
Solved. thanks

Last edited by nomer2007; 10/11/07 01:26 PM.
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
The line he gave shouldn't give that error.

Make sure the line reads: if ($istok(%master,$opnick,44)) { msg $opnick hello master cronicman }

Joined: Oct 2007
Posts: 92
N
Babel fish
OP Offline
Babel fish
N
Joined: Oct 2007
Posts: 92
i checked on the help file sir

Code:
$istok(text,token,C)


Code:
if ($istok(%master,$opnick,44))


should be
Code:
if ($istok($opnick,%master,44))

Joined: May 2007
Posts: 89
T
Babel fish
Offline
Babel fish
T
Joined: May 2007
Posts: 89
Originally Posted By: nomer2007
i checked on the help file sir

Code:
$istok(text,token,C)


Code:
if ($istok(%master,$opnick,44))


should be
Code:
if ($istok($opnick,%master,44))


Well, that's only because, as you stated in your first post in this thread, %master = cronicman. So as it is itself a token, your saying that

Code:
if ($istok(%master,$opnick,44))


equals

Code:
if ($istok($opnick,%master,44))


is ok. But this won't be true if %master is a multi-tokenized string. Eg, cronicman,somenick,anothernick. In that case then, the correct syntax would be

Code:
if ($istok(%master,$opnick,44))


In fact, you don't even have to use $istok here if my doubts are correct. You could just use

Code:
if ($opnick == cronicman)


smile

Last edited by TropNul; 10/11/07 04:39 PM.

tropnul
Joined: Oct 2007
Posts: 92
N
Babel fish
OP Offline
Babel fish
N
Joined: Oct 2007
Posts: 92
just wanna try new things and thanks


Link Copied to Clipboard