mIRC Home    About    Download    Register    News    Help

Print Thread
#163381 29/10/06 07:28 AM
Joined: Jun 2006
Posts: 79
B
Babel fish
OP Offline
Babel fish
B
Joined: Jun 2006
Posts: 79
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

#163382 29/10/06 07:40 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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)


Link Copied to Clipboard