mIRC Homepage
Posted By: BanJirian Remove duplicate - 29/10/06 07:28 AM
Code:
 
super.random {
  while ($numtok(%super.random,44) < 22) {
  %random.item = $r(1,90) | .set %super.random $addtok(%super.random,%random.item,44) | .echo -a $numtok(%super.random,44) %random.item | .inc %n }
}

 


I think that its because i dont put this codes

(%random.item = $istok(%super.random,44))

Is it right ? Thanks
Posted By: RusselB Re: Remove duplicate - 29/10/06 07:40 AM
The usage of $addtok will prevent duplicate items.

From the help file
Quote:
Adds a token to the end of text but only if it's not already in text.


The usage of inc %n in that code is irrelevant (unless it's being used elsewhere for something)
© mIRC Discussion Forums