How do i use random?SOLVE
Posted: Wed Apr 10, 2013 5:29 pm
Hey lovers how do i use random function?
I initialized it using these lines of code :
math.random(os.time()) SOLVE IT : i forgot to add randomseed , ups
math.random()
math.random()
math.random()
smt = math.random(600)
print(smt)
Everytime when i run the app it gives me the same number 293,why? I really need to learn how to use random function because i need it into my game.
Thanks for your help!
I initialized it using these lines of code :
math.random(os.time()) SOLVE IT : i forgot to add randomseed , ups
math.random()
math.random()
math.random()
smt = math.random(600)
print(smt)
Everytime when i run the app it gives me the same number 293,why? I really need to learn how to use random function because i need it into my game.
Thanks for your help!