p = {5,1}
readtable(p)
C++:
int l_readtable(lua_State* luaVM){
if(lua_istable(luaVM,-1)){
lua_pushnumber(luaVM,0);
lua_gettable(luaVM,1);
int obj = (int)lua_tonumber(luaVM,-1);
}
return 0;
}
I don''t know why but obj (that should have a value form the table) is always 0 and no element from the table is 0, Why? What I''m doing wrong?
Filami