luaL_typerror
int luaL_typerror (lua_State *L, int narg, const char *tname);
Generates an error with a message like
<location>: bad argument <narg> to <function> (<tname> expected, got <realt>)
where <location>
is produced by luaL_where
,
<function>
is the name of the current function,
and <realt>
is the type name of the actual argument.