lua-users home
lua-l archive

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


Thanks for the reply!

How would I make a C++ (or Delphi in my case) object *that is already
created* accessible in Lua then?

I've tried creating full userdata that is only a pointer to my object
and then dereferencing the pointer but it's not working properly at
all...

So, if I already have an object created (lets call this object Player1
of class TPlayer), how do I make a userdata object out of it?

On a sidenote, I think I've finally figured out the correct way to
setup a metatable for userdata.  I'm still wondering if I need to make
my metatable table global or not though.


On 12/15/05, Daniel Silverstone <dsilvers@digital-scurf.org> wrote:
> On Thu, 2005-12-15 at 11:09 -0500, John Klimek wrote:
> > 7) Push light userdata onto the stack.
>           ^^^^^
>
> Light userdata objects can't have metatables.
>
> D.
>
> --
> Daniel Silverstone                         http://www.digital-scurf.org/
> PGP mail accepted and encouraged.            Key Id: 2BC8 4016 2068 7895
>
>
>