lua-users home
lua-l archive

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


print out your stack to see what's going on.

wes

On 8/16/07, L-28C <kixdemp@gmail.com> wrote:
> Okay, here's what I use:
> ------------
> tolua_pushuserdata(Script, WalkLayer);
> lua_setglobal(Script, "WalkLayer");
> ------------
>
> It gives me this:
> ------------
> PANIC: unprotected error in call to Lua API (./Maps/Legacy.map:19:
> attempt to index global 'WalkLayer' (a nil value))
> ------------
>
> And I don't even know why this is... WalkLayer is initialized. :-/
>
> Help? Thanks!
>
> Wesley Smith wrote:
> > lua_pushuserdata(L, class);
> >
> > wes
> >
> > On 8/16/07, L-28C <kixdemp@gmail.com> wrote:
> >> Hello everyone!
> >>
> >> Okay, how would I push an element of a custom type (it's a class object)
> >> into the Lua stack? Said custom type has been binded (erm, bound?) with
> >> toLua.
> >>
> >> Hawlp? Thanks!
> >>
> >>
> >
>
>