Replace luaL_checkinteger() by luaL_checkint().