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
   return nil

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

...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: