Assuming the following lua code:
local FooTable={ ["FooKey"]="FooValue" }
The index of "FooValue"
is "FooKey"
. So I can access it like this without any issues (Assuming FooTable is on top of the stack.):
lua_getfield(L, -1, "FooKey");
When I try something like this:
local FooTable={ "FooValue" }
I would assume that index of "FooValue"
is "1"
. But the following gives me a nil
return.
lua_getfield(L, -1, "1");
Is there a special approach to accessing numeric keys in tables?