[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: attempt to concatenate a userdata value
- From: Sam Roberts <vieuxtech@...>
- Date: Sun, 31 Jan 2010 11:49:20 -0800
On Sun, Jan 31, 2010 at 11:14 AM, Kuang Chen <kchenphy@gmail.com> wrote:
> Hi,
>
> I am encountering this error "attempt to concatenate a userdata
> value" when I am trying to write a tostring metamethod for userdata
> "realvector". This is what the function looks like:
The code you posted didn't have any calls to the concatenate operator
(..), so probably isn't the source of the problem.
I suspect you are using .. in your lua code, somewhere, and thinking
that __tostring() will automatically be called on your userdata prior
to concatenation, but it won't be.
Cheers,
Sam