lua-users home
lua-l archive

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


Roger D. Vargas wrote:
How can i make a C function called from a lua script to return a value? Something like: x= get_x() (get_x is defined and registered in C)

Push your return values to the lua stack and then make
your C function return a non-zero int (which is the
number of items you are returning).

Please see the manual.

--Adam
--
Adam D. Moss   . ,,^^   adam@gimp.org   http://www.foxbox.org/   co:3
That gum you like is going to come back in style.