lua-users home
lua-l archive

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


	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