On 15 March 2013 11:27, Ico <lua@zevv.nl> wrote: > lua_pushstring(L, "type"); lua_pushnumber(L, s.f_type); lua_settable(L, -3); Side note: Simpler to use lua_setfield: lua_pushnumber(L, s.f_type); lua_setfield(L, -2, "type");