lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

But if you're executing the script, in it's entirely, more than once a
second you're randomseed()'ing with the same time in that second and
you'll get the same random numbers...

On Sun, Jan 17, 2010 at 12:23 AM, Alex Davies <> wrote:
> Majic wrote:
>> Yes yes, was just hoping to get random numbers more than once a second
>> :)  I don't think that's portable though.... oh well.
> Easy ;).  Call randomseed once, when your program is first loaded... and
> then call random whenever you need a new number.  There's no need to call
> randomseed more then once.
> - Alex