Well I was able to fix it by rewriting the RandomGenerate Function to this...

Code:

Function RandomGenerate($howmany,$limit)
Global $output[$howmany]
SRND(@msecs)
$R = Rnd($Limit)

$= 0
While $ <= $Howmany
If Ascan($Output,$r) = -1
$output[$] = $r
$ = $ + 1
Else
$R = RND($Limit)
Endif
Loop
EndFunction