Re: Error on include/require
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Error on include/require
- From: Tomas Guisasola Gorham <tomas@...>
- Date: 2007年3月10日 14:46:40 -0300 (BRT)
Hi David
> Then I call Test.lua like this:
> luaL_dofile(luaState, "Test.lua");
What is in your Test.lua file?
> lua_getglobal(luaState, "Test"); // Lua function to be called
> lua_pushlightuserdata(luaState, dllData);
> if (lua_pcall(luaState, 1, 0, 0) != 0)
Don't you think it should be better to check whether `Test'
is a function or not before trying to call it?
> If I remove the import and require statements, the Lua code runs fine.
`import' is not a predefined name in Lua.
> Am I missing something?
Maybe the files are obfuscating what is really happening...
Tomás