lua-users home
lua-l archive

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


On Mon, Jul 16, 2012 at 04:56:38PM +0800, zaker wrote:
> I use "lua_rawseti(L, -1, 0)" to set a table's 0 index.  

I think lua_rawseti(L, -1, 0) corresponds to v[0] = v, which is probably
not what you want. You probably want lua_rawseti(L, -2, 0). 

> And I write a function that will get the entry from table. The
> function prototype is "GetValue( index, table )".  I just can't get
> the value by "GetValue( 0, table )" or "GetValue( '0', table )".

Well this is no help without knowing how GetValue is defined.

> Is there any rules how lua parse number ?

Of course, but that doesn't seem relevant to this.