From: PINELLI Thierry SGAP Marseille <thierry.pinelli@interieur.gouv.fr>
Reply-To: Lua list <lua@bazar2.conectiva.com.br>
To: Lua list <lua@bazar2.conectiva.com.br>
CC: lua@bazar2.conectiva.com.br
Subject: Re: C Function returning a table to LUA?
Date: Mon, 29 Sep 2003 10:59:25 +0200
On Mon, Sep 29, 2003 at 04:44:08AM -0400, Jason P wrote:
> for (int i = 0; i < NumFileNames; i++)
> {
> lua_pushnumber(L,i);
> lua_pushstring(L,MyFileNames[i]);
Are your sure ?
Lua's tables' indexes begin to 1 ?
> lua_settable(L,-3);
> }
> return 1;
>