|
Hallo, On 5/10/06, Turgut Hakkı ÖZDEMİR <extronus@gmail.com> wrote:
// --- Start crying here -------------------------- int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { lua_State *L = lua_open(); luaL_openlibs(L); luaL_loadfile(L, "test.lua"); lua_register(L, "msg", msg); lua_call(L, 0, 0); // when i use lua_pcall instead of lua_call here, surrounded with error handling functionality it complains about nil values lua_close(L); }
After loading the test.lua file, you must run it because it's just a function on the stack at this point. After running it your declarations will have effects. -- -alex http://www.ventonegro.org/