lua-users home
lua-l archive

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


I am working in Lua 4.0.  This is what I have and what I want to do:

function Anin_Index( t, i )
 if i == "Play" then
   return Play
 else
   return nil
 end
end

function LoadAnimation( name )
 return { NAME = name, ID = 1 }
end

...And I have a tag set to this table that overides the index method so that when I do...

Animation = LoadAnimation( "BlackDog.dat" )
Animation.Play( 1, 3 )

..The Play will actually call the 'c' function Play(), but I also want the ID of that table sent to 'C' with it. How can this be done??? Can I add it to the stack thats being sent to 'C' ???


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com