mIRC Home    About    Download    Register    News    Help

Print Thread
#25680 23/05/03 07:02 PM
Joined: May 2003
Posts: 6
T
Tears Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: May 2003
Posts: 6
Someone care to explain this to me:

$gettok(telia.com,0,46) = insufficient parameters

$gettok(telia.com,$gettok(telia.com,0,46),46) = com

It must get some value by the first statement, but it doesn't show me anything, yet it is using whatever that value is in the second statement.

(Trying to catch up on tokens)

Thanks in advance.


I cry for Tears
#25681 23/05/03 08:08 PM
Joined: Dec 2002
Posts: 21
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Dec 2002
Posts: 21
Well I'm not an expert on 'tokens', but here is what I found.

I used a command line of:
//echo -a It is $gettok(telia.com,0,46)
and the output was: It is 2

This tells me that there are two items separated by a period
delimiter (the 46). (The zero in there is probably causing it
to return the total number of items, rather than one specific
one as described in the help files.)

Substituting that '2' result from this test, into the second line
you mentioned, would mean that it will show the second
paramter delimited by the period (like the help files
describe). This is how you end up with 'com'.

Hope that this helps,

Listner


Morals: When the p0rn shop gives you too much change, and you don't keep it.
#25682 23/05/03 10:36 PM
Joined: Dec 2002
Posts: 169
J
Vogon poet
Offline
Vogon poet
J
Joined: Dec 2002
Posts: 169
If you are using //echo $gettok() and the result of $gettok is a number then you get an error because mirc interprets that number as a color, not the text to echo. /echo 2 = /echo: insufficient parameters. Try using //echo -a as listener suggested.

#25683 24/05/03 10:44 AM
Joined: May 2003
Posts: 6
T
Tears Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: May 2003
Posts: 6
Hmm...aparently it doesn't like to echo the first statement without -a, even though I just wrote it.

Makes sence now when I see that it gives me 2 .

Thx alot.


I cry for Tears

Link Copied to Clipboard