I was just mucking around using lua on my windows machine then I decided to carry on using the linux box when when I compile it fails with a dialog saying
"cannot find interface for module axe.lua"
this is the code Im trying to compile.
any ideas ?
"cannot find interface for module axe.lua"
this is the code Im trying to compile.
SuperStrict Import axe.lua Global finished:Int finished = False Local LuaState:Byte Ptr = luaL_newstate() luaL_openlibs(LuaState) Local Script:String RunScript(LuaState,"print('8'+8)") RunScript(LuaState,"print('Hello World!','**')") RunScript(LuaState,"print('Hello World End!')") RunScript(LuaState,"print('Done')") Print "----------OutPut----------" Print GetPrintOut(LuaState) Print "--------------------------" lua_close(LuaState) Print "finished" End Function RedirectPrint(LuaState:Byte Ptr) ' Initialise the PrintOut Global variable lua_pushstring(LuaState, "") lua_setglobal (LuaState, "PrintOut") ' Replace the print function with our one which will ' add the output to the Global variable RunScript(LuaState, .. "function print(...)~r~n" .. +" if arg.n > 0 then~r~n" .. +" for indx = 1, arg.n do~r~n" .. +" if PrintOut == '' then~r~n" .. +" PrintOut = arg[indx]~r~n" .. +" else~r~n" .. +" if indx == 1 then~r~n" .. +" PrintOut = string.format('%s\r\n%s',PrintOut,arg[indx])~r~n" .. +" else~r~n" .. +" PrintOut = string.format('%s %s',PrintOut,arg[indx])~r~n" .. +" end~r~n" .. +" end~r~n" .. +" end~r~n" .. +" end~r~n".. +"end") End Function Function RunScript:Int(LuaState:Byte Ptr,script:String) Local res:Int res = luaL_loadString(LuaState,script) ' Print "loading" ' Print Script ' Print "-------------" ' Print "load returned : " + res If res <> 0 Then Print "ERROR : " + luaL_CheckString(LuaState,-1) Else res = lua_pcall(LuaState,0,LUA_MULTRET,0) If res <> 0 Then Print "ERROR : " + luaL_CheckString(LuaState,-1) End If End If End Function Function GetPrintOut:String(LuaState:Byte Ptr) Local retStr:String ' get the Global variable containing all the print output ' since the last time it was retrieved. lua_getGlobal(LuaState,"PrintOut") retStr = lua_toString(LuaState,-1) ' Clear out the Global variable lua_pushstring(LuaState, "") lua_setglobal (LuaState, "PrintOut") Return retStr End Function
any ideas ?