lua_getfield(L, table, fieldname);
bool got = false;
if(lua_isnumber(L, -1)){
- result = lua_tonumber(L, -1);
+ result = lua_tointeger(L, -1);
got = true;
}
lua_pop(L, 1);
lua_getfield(L, table, fieldname);
bool got = false;
if(lua_isnumber(L, -1)){
- result = lua_tonumber(L, -1);
+ result = lua_tointeger(L, -1);
got = true;
}
lua_pop(L, 1);
lua_getfield(L, table, fieldname);
bool got = false;
if(lua_isnumber(L, -1)){
- result = lua_tonumber(L, -1);
+ result = lua_tointeger(L, -1);
got = true;
}
lua_pop(L, 1);
lua_getfield(L, table, fieldname);
bool got = false;
if(lua_isnumber(L, -1)){
- result = lua_tonumber(L, -1);
+ result = lua_tointeger(L, -1);
got = true;
}
lua_pop(L, 1);