9951 explained code solutions for 126 technologies


luaGetting random numeric value


math.randomseed(os.time())
rand = math.random(1, 10)ctrl + c
math.randomseed(os.time())

init unique random generator (use local time for seed)

math.random(

return random number within given range

1, 10

min and max value of the number to generate

rand =

will contain generated random number