Re: Cannot call lua function from C application
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Cannot call lua function from C application
- From: Ignacio Burgueño <ignacio@...>
- Date: 2006年7月31日 14:20:56 -0300
Yang Fan wrote:
Thanks for replying.
The function "main" gets an argument, so we should push something into
the virtual stack after lua_getglobal.
Maybe somewhere else makes things incorrect.
Sorry. I missed that. Then your pcall is wrong.
if (lua_pcall(L, 0, 0, 0) != 0)
shouldn't be if (lua_pcall(L, 1, 0, 0) != 0)
http://www.lua.org/manual/5.1/manual.html#lua_pcall