Using the following code I am not able to retrieve random #'s as I expected. When I call the Function Regenerate() the $Lbl_RNUM[0] works as expected however the $lbl_RNUM[$] always comes back with the same values.

Code:

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

for $ = 0 to $Howmany
While Ascan($output,$r)<0
$output[$] = $R
$R = Rnd($limit)
Loop
Next

EndFunction

Function Regenerate()
RandomGenerate(5,55)
For $ = 0 to 5
$LBL_RNUM[$].Text = $output[$]
Next
RandomGenerate(1,42)
$LBL_RNum[0].Text = $output[0]
EndFunction


_________________________
Today is the tomorrow you worried about yesterday.