Converts the Lua value at the given acceptable index to the signed
integral type
Integer. The Lua value must be an integer, a
number, or a string convertible to an integer (see
§3.4.3 of
the Lua 5.4 Reference Manual); otherwise,
lua_tointegerx
returns
0.
If the number is not an integer, it is truncated in some non-specified
way.
If
isnum is not
NULL, its referent is assigned a
boolean value that indicates whether the operation succeeded.
https://www.lua.org/manual/5.4/manual.html#lua_tointegerx