|
|
||
|
Shane Lee wrote:
if (luaL_dofile(state,"hello.lua" !=0) {
printf("Parsing Error for file 'hello.lua'");
return (NULL);
}
return 0;
}
And running this gives what you might expect: Parsing Error for file 'hello.lua'
I can't seem to make his code work at all...
luaL_dofile failing doesn't mean that its a parsing error.......Try checking the string at the top of the stack, this will contain the cause of the error.
Also note that there is a luaL_openlibs(lua_State* L); function that opens all std libraries in Lua...