June 4, 20206 yr My Lua script has: require('Luacom') it returns an error saying can't find LuaCOM. It doesn't seem to be a path problem. I have even tried specifying the path in code. I believe it is a library problem. I placed the luacom.dll at the root of the FSUIPC6 folder and many other locations still without success. I am attempting to use the Pokeys 57u card for output to LEDs. 47094 *** LUA Error: ...uments\Prepar3D v5 Add-ons\FSUIPC6\PoKeys Test 3.lua:38: module 'luacom' not found: is there a LuaCOM.dll that is compatible with my system setup? I reviewed all of the old archives from many yearas ago and tried each solution with no results.
June 4, 20206 yr I don’t know the LuaCOM library but I assume you are referring to a LuaCOM.lua file. The LUA require() function requires the full path to the referenced LUA file without the .lua extension. It does not work with .dll files. Our code uses the LINDA defined function file_exists() function in a if/then construct to avoid the errors you see if the file path is not correct. Note file_exists() requires the full path but with the .lua extension. Andrew Gransden Scotland, UK LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew
June 16, 20205 yr Author Scot, the LuaCOM library is just like any other library and is a DLL file. I truly thought the Lua require statement could load a DLL. The Lua manual says it can. Thanks for taking the time to respond. Plus there are several folks back 5 or more years ago that say that got it running. I simply can't duplicate their work on Windows 10 and P3D v5.
June 17, 20205 yr The require() instruction is used in LINDA to load the library or configuration file containing LUA code into line with the already loaded/running LUA code. For example, it loads the config-hid.lua to include the HID Joystick commands or reads the aircraft LUA module for execution. I don’t see how it can read .dll libraries into the LUA code. You may be better asking that question on the FSUIPC support forum. Andrew Gransden Scotland, UK LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew
October 6, 20232 yr Did we get a resolution to this? P3D is a 64 bit program whereas LuaCOM is 32 bit. The two are incompatible. That said, a registered version of WideFS7 with FSUIPC can connect to P3D and WideFS is and Pete Dowson said always would be a 32 bit program. Having the LuaCOM file in the same folder as the WideClient app with the Lua package.path and package.cpath set to the WideClient folder too allows WideFS to find the LuaCOM.dll file... I've done this today. However after finding the DLL file there is now a new error I'm trying to resolve, any help appreciated: 9140 *** LUA Error: error loading module 'luacom' from file 'D:/WideClient/luacom.dll': D:/WideClient/luacom.dll:1: '=' expected near '' On 6/4/2020 at 3:58 PM, navymustang said: My Lua script has: require('Luacom') it returns an error saying can't find LuaCOM. It doesn't seem to be a path problem. Edited October 6, 20232 yr by Tornadowilkes Ian Father of the Baton PPL(A) IMC PPL(H)
Archived
This topic is now archived and is closed to further replies.