I wonder how to use math.randomseed in Lua. Indeed when used as a function, I get an error and when used as a variable it just does not work.
> math.randomseed = 0
> math.random()
0.51340090995654
> math.randomseed = 0
> math.random()
0.9522297247313
> math.randomseed (44)
stdin:1: attempt to call a number value (field 'randomseed')
stack traceback:
stdin:1: in main chunk
[C]: in ?
Aucun commentaire:
Enregistrer un commentaire