Cool Dan Luke Posted February 27, 2021 Report Share Posted February 27, 2021 Hi, I have latest version of P3D version 5 and full paid version of FSUIPC. I was following a tutorial using the sample LUA script HidDemo.lua. I replaced the joystick vendor and product id with the correct values. I copied the lua script file into the P3D module folder: D:\Program Files\Lockheed Martin\Prepar3D v5\Modules I enabled logging to see the results. I checked both boxes for the "Log lua files separately" and "Debug/trace lua plugins". However nothing gets logged to screen. Nor there is a separate lua log for my script. I also checked the .ini file to see if the lua script was added to the lua section. Nothing. So I tried dropping the script into the main FSUIPC6 folder: C:\Users\xxx\Documents\Prepar3D v5 Add-ons\FSUIPC6 After restarting P3D, the .ini file now picks up the lua script and adds it to the lua section. However I still don't see any logs. Thoughts? Quote Link to comment Share on other sites More sharing options...
aua668 Posted February 27, 2021 Report Share Posted February 27, 2021 Hi, LUA scripts are not executed automatically per default. You have to put a line into the [Auto] section of the INI file or you have to start the LUA procedure by assigning it to a button or key. Details are found in the manual for advanced users. Rgds Reinhard Quote Link to comment Share on other sites More sharing options...
Cool Dan Luke Posted March 1, 2021 Author Report Share Posted March 1, 2021 Thank you, that worked. I guess I was expecting it to behave similar like version 7 that adds this entry automatically. Quote Link to comment Share on other sites More sharing options...
John Dowson Posted March 1, 2021 Report Share Posted March 1, 2021 31 minutes ago, Cool Dan Luke said: I guess I was expecting it to behave similar like version 7 that adds this entry automatically. Luas are NEVER automatically added to the [Auto] section. They are automatically added to your [LuaFiles] section. They are different. Certainly all luas should NOT be auto started, that depends on the lua, so we cannot automatically do this. Quote Link to comment Share on other sites More sharing options...
Pete Dowson Posted March 1, 2021 Report Share Posted March 1, 2021 33 minutes ago, Cool Dan Luke said: I guess I was expecting it to behave similar like version 7 that adds this entry automatically. As John said, no version of FSUIPC has ever started any Lua plug-in automatically except those specifically named for this -- see this part of the very first page of the supplied Lua plug-ins document, which you have: There are currently three explicitly reserved Lua names, for programs which are run automatically if present: ipcinit.lua automatically run as soon as FSUIPC has connected to the FS. ipcready.lua automatically run when FS is really “ready to fly”. ipcDebug.lua automatically loaded before any Lua program which is started in Debug mode. Pete Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.