lua-users home
lua-l archive

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


I guess the lesson to be learned here is "Master the stack", thanks again for the replies guys.

-----Original Message-----
From: Ariel Manzur

I think the problem is that you're not passing 'self' to the function.. 
when you call a function from lua using the colon, it's like calling it 
with self, for example 'object:method()' is actually 
'object.method(object)'. So when using the C API, you need to do this by 
hand. You can probably do a 'lua_insert(ls, -2)', to swap the function with 
the table, and then 'lua_call(ls, 1, 0)', because you're actually sending 1 
parameter ('self').

bye..


Ariel.
http://Anime.com.ar
snm