luaL_checkint and luaL_optint are deprecated in lua 5.3 The variants luaL_checkinteger and luaL_optinteger work the same with an implicit typecast (lua_integer -> int).