API Reference | developer.brewmp.com API Reference | developer.brewmp.com

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.
Params
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.