LUAL_TYPERROR(3) Library Functions Manual LUAL_TYPERROR(3)

luaL_typerrorgenerates an error with a message, function indicator [-0, +0, v]

#include <lauxlib.h>

int
luaL_typerror(lua_State *L, int narg, const char *tname);

() generates an error with a message like the following:

: bad argument narg to ( tname expected, got rt)

where location is produced by luaL_where(3), func is the name of the current function, and rt is the type name of the actual argument.

luaL_where(3)

Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.

The luaL_typerror() manual page is based on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.

July 21, 2022 Debian