-- first, one of ...
randomsource = ROT.RNG.LCG:new()
randomsource = ROT.RNG.MWC:new()
randomsource = ROT.RNG.MWC:new()
-- then
randomsource:random(1,100)
... ROT.RNG.<whatever> causes something like:
Error: rotLove.lua:450: attempt to perform arithmetic on field 'x' (a nil value)
That line is, for example:
local t = self.a * self.x + self.c
The a and c are supplied, eg...
function ROT.RNG.MWC:random(a, b)
So the culprit seems to be self.x, which seems to be some kind of mystic state table thing inherited from RNG? Perhaps I missed some initialization. Anyway, defaults should work... fixing this in rotLove itself is beyond me.
When initialized and used as follows...
...
ROT.RNG.<whatever>
causes something like:That line is, for example:
The
a
andc
are supplied, eg...So the culprit seems to be
self.x
, which seems to be some kind of mystic state table thing inherited from RNG? Perhaps I missed some initialization. Anyway, defaults should work... fixing this in rotLove itself is beyond me.