lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> There are two types of userdata: light and heavy.  I guess
> you're supplying one and the API expects the other.  Sadly,
> it seems impossible to distinguish between the two types on
> the Lua side.

This is true, but it is not an excuse for that poor error message.
The io library gives nice messages even when supplied with userdata:
	bad argument #1 to 'close' (FILE* expected, got userdata)
This is message is produced by luaL_checkudata.