lua-users home
lua-l archive

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


Pablo Saldo wrote:
 >> My Experiences prove it can't get the next table's index.

   Try changing this:

 >> lua_callfunction(lua_getglobal('next'));

   to this:

 >> lua_callfunction(lua_getglobal('next'+char(0)));

   Delphi will type convert string types to pchars but it won't add a
terminator for you.  (this can lead to obscure access violations depending
on how the caller uses the string!)  I'm guessing that this is preventing
Lua from finding a symbol match.  Also, you might try splitting up those
two calls and check the tag returned by lua_getglobal in the debugger.

   Cheers,

   Dave