hi all
I’m trying to get the random number by using following code to fetch a predefined value from numerArray.
numberArray = [4,5,6,77,88,33]
function testing ()
math.randomseed(os.time())
value = numberArray [math.random(1,8)]
end
timer.performWithDelay(8000, testing, 30)
the out put of math.random is generating the same number for 3 time continuously and then its generating(every 4th time) new random number.
for 1st 3 calls its giving 5,5,5
next 3 calls = 1,1,1
next 3 calls = 8,8,8
is the diff between min and max values in the math.random should be more?
any better solution? [import]uid: 50443 topic_id: 30619 reply_id: 330619[/import]