lua-users home
lua-l archive

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

Bob Smith wrote:
My result when calling a() would be "outa" when I would expect only "a"
Is this because I am using lua_dofile(...) then lua_getglobal(..., "a") and finally a lua_pcall(...)

Yes, that's all you need to do if you just want to call function 'a'

lua_getglobal(L, "a");
lua_pcall(L, 0, 0, 0);

- Peter Shook