[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: precompiling lua script problem
- From: "Nick Trout" <nick@...>
- Date: Mon, 7 Jul 2003 14:49:52 -0700
> In our game we procompile all of our lua scripts using luac.exe
> before running the game. In doing this we noticed a problem where lua
> believe a table is nil when indexed if it contains more than 64
> 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
> 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
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