lua-users home
lua-l archive

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


> In our game we procompile all of our lua scripts using luac.exe
(offline)
> before running the game. In doing this we noticed a problem where lua
will
> believe a table is nil when indexed if it contains more than 64
entries.
> When running the game with the regular lua text files it works fine.
> So it seems that precompiling the file causes the file to execute
> differently... does anyone know anything about this? As a temporary
fix we
> may have to split all of our large tables into chunks of less than 64
> entries and/or fallback to using text files.
> 
> 
> Note: using: lua 4.01... v1.79a

Which platforms are development and target? Both PC (because of your
previous titles)?

Do you have a different memory manager in the game? (i.e. lmem.c has
been touched). Could be a bug in allocation or realloc (when table size
expands past 64).

Have you been into llimits.h and made sure that Lua is tuned the same
between both platforms? i.e. both float or double. long has a different
size on some platforms, e.g. PS2 is 64 bit long and PC is 32 bit. Lua
does some header checks on compiled code though. It should catch most of
these issues including endianess, which it deals with (or does in 5.0
anyway).

Regards,
Nick