I guess this post is to shuffle a pack in an array so a number is not repeated?
I would put the numbers in the array first and then just shuffle the order.
global dim rnd[6]
// Put the numbers 1 to 6 into the pack
for i = 1 to 6
rnd[i] = i
next i
// Shuffle the pack up
for i = 1 to 6
r = Random( 1, 6 )
temp = rnd[i]
rnd[i] = rnd[r]
rnd[r] = temp
next i
do
for c = 1 to 6
Print(rnd[c])
next c
Sync()
loop
@Behdadsoft, is this what you mean?
Quote: "with repeat number"
Just that you put WITH repeat or is that meant to be WITHOUT?