> math.randomseed( os.time() )
> Then I have this code in the event loop every time I tap a button:
> screen.moveto( 0, 52 )
> print( math.random( 10 ) )
> However, the sequence of numbers ( 1, 7, 8, etc. etc. ) is the same
> time. Am I doing something wrong or stupid? Is this supposed to
> is just a quirk or bug?
> Oh yeah, Plua 2.0b7, Palm Lifedrive ( OS v5.4.8 )
It is a bug. math.randomseed() does not accept large numbers. For now,
try a smaller seed.
> Also, math.randomseed(0) doesn't work usefully-it seems to ignore a
seed of 0.
> E.g. This program:
> Just produces 4 4 3 everytime it is run...
This is because math.randomseed() uses PalmOS API SysRandom(). In this
function a zero argument means: get the next random value in the
sequence started by the previous non-zero seed, which is your example
> What is the value of x - i.e. What is the largest number that
randomseed can manage?
The largest 32-bit signed positive number, or (2^31)-1.