toInteger package:hslua-core

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, tointeger returns Nothing. If the number is not an integer, it is truncated in some non-specified way. Wraps lua_tointegerx. See also: lua_tointeger.