Jump to content
The simFlight Network Forums

My Lua script is not executing on P3D5 and FSUIPC6

Recommended Posts


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.



Link to comment
Share on other sites



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.




Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.



Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.