[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: userdata expected, got userdata
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 8 Feb 2006 07:26:36 -0200
> 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.
--lhf