Generates an error with a message.
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.