Clarification (sorry the question was not specific): They both try to convert the item on the stack to a `lua_Number`. `lua_tonumber` will also convert a string that represents a number. How does `luaL_checknumber` deal with something that's not a number?

There's also `luaL_checklong` and `luaL_checkinteger`. Are they the same as `(int)luaL_checknumber` and `(long)luaL_checknumber` respectively?