Developer

API Reference

ILuaEx_CheckNumber()

Brew Release
Brew MP 1.0.2
See Also
Lua_IsNumber(), ILua_ToNumber(), ILuaEx_CheckInteger()
Description
Checks whether the given function argument is a numeric type, and returns its value.
Parameters
  • pif
    []:
    a pointer to the ILuaEx object
  • nIndex
    []:
    the number of the argument that is of incorrect type. Note this should be a positive-valued number, as the error message will only print out the error based on function arguments.
Interface
Prototype
   double ILuaEx_CheckNumber(ILuaEx *pif, int nIndex)
Return
If the argument is not a number or convertible to a number, it will throw an error.
Side Effect
This function does not return, but if the argument does not match the expected type, it will throw an error.
  • Follow