mIRC Home    About    Download    Register    News    Help

Print Thread
#123987 30/06/05 11:40 AM
Joined: Nov 2003
Posts: 6
D
droi Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
D
Joined: Nov 2003
Posts: 6
Hi,

Can anybody tell me why mIRC isn't placing a point between these two numbers? It needs to return in 100.100 isn't it?!?

$addtok(100,100,46)

It works when you use $addtok(100,101,46) for example...


Mess with the best, die like the rest!
#123988 30/06/05 11:50 AM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
$addtok doesn't work if the specified token is in text (so 100 is in 100, 101 is not in 100).

Use $instok:

$instok(100,100,3,46)

Regards,


Mentality/Chris
#123989 30/06/05 02:11 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
$instok(100,100,999,46) would be more identicle to $addtok (minus the dont add if duplicate), 999 since that well always make it the last element.
* i mean this for real examples of course since you could just got 100.100 for the above smile

#123990 30/06/05 02:26 PM
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
I've always used N=0 for that, e.g. $instok(100,100,0,46). Undocumented behaviour, but rather convenient.


Saturn, QuakeNet staff
#123991 30/06/05 06:13 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
-1 puts it one in from the end so i guess it just follows 0 would put it at the end, i use 999 since with the string limit u cant have even 500 items let alone 999, and 999 for me stands out as PUT IT AT THE END smile


Link Copied to Clipboard