lua-users home
lua-l archive

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


2011/1/20 Steve Litt <slitt@troubleshooters.com>:
>    lua_getglobal(L, "tellme");
>    if (lua_pcall(L, 1, 0, 0))
>        bail(L, "lua_pcall() failed");

I think you got something wrong in your demonstration. That code is
not calling "tellme", which could still be nil (or any other
non-callable value). It's calling the function that was already on the
top of the stack before you called lua_getglobal. And the function
will receive exactly one argument, the value of the global "tellme"
variable.