lua-users home
lua-l archive

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

I've just finished upgrading my TileEngine game platform to use Lua

Everything is working fine, in fact I've even added better error
handling while loading scripts instead of using the old lua_dofile
syntax.  The only problem is that math.random() always returns zero,
even when called with parameters eg: 
iResult = math.random(750,2000)

I use the random functionality for my Actor AI, so when it returns zero
all of the actors just stand there mutely.

I have randomised the seed with "math.randomseed( os.time())".  

Does anyone have any suggestions on why this might be happening?

Beric Holt
Soap Dragon