Apologies for another silly little question.
In C code, for 5.1, if I call luaL_checkudata but the index doesn't exist (say I was expecting an arg but none was provided), is that OK (and I get expected failure) or is that somehow bad or undefined?
The docs just say:
luaL_checkudata: Checks whether the function argument
narg
is a userdata
of the type
tname
(see
luaL_newmetatable
).