lua-users home
lua-l archive

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


On Sun, May 30, 2010 at 11:11 AM, Erwin Oegema
<blablaechthema@hotmail.com> wrote:
> int LuaExports::askNumber(lua_State *luaVm) {
>     getNpc(luaVm)->sendGetNumber(lua_tointeger(luaVm, -3),
> lua_tointeger(luaVm, -2), lua_tointeger(luaVm, -1));
>     return lua_yield(luaVm, 1);
> }
>
> I call the function in a Lua file with this:
>
> askNumber(0, 0, 0);
>
> But it gives me these results:
> getNpc(luaVm)->sendGetNumber(0, 0, 1);

Are you sure that getNpc(luaVm) is leaving the stack exactly as it found it?