lua-users home
lua-l archive

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


I guess it does :p It might have changed, but why would it work in Debug mode and not in Release mode?

> Date: Sun, 30 May 2010 11:14:51 +0100
> Subject: Re: Lua and C++ (stack)
> From: lua@corsix.org
> To: lua@bazar2.conectiva.com.br
>
> 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?


SMS "HOTMAIL" naar 3010 en ontvang gratis de juiste instellingen voor Hotmail op je mobiele telefoon.