random - randomseed in LUA -


i working on code randomizes numbers. put math.randomseed(os.time()) inside loop. code goes this:

for = 1, 1000   math.randomseed( os.time() )   j = math.random(i, row-one)   u[i], u[j] = u[j], u[i]   k = 1, 11      file:write(input2[u[i]][k], " ")   end   file:write"\n" end 

and when run several times, whole output same. isn't randomseed supposed prevent repeats when re-run?

call math.randomseed once @ start of program. no point calling in loop.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -