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
Post a Comment