Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Two questions please:

1. Can you point me to documentation or let us know what to do if we change an Lua program or change the FSUIPC7.ini to retetst the change? Must we restart MSFS from scratch? The changes don't seem to take effect on Flight Restart or creating a new flight from the Main Menu. Time consuming to start MSFS from scratch. 

2. Is there a way to eliminate all Lua traces and still display ipc.log entries?

If you need more info, please let me know.

Thanks

Posted
11 hours ago, DaveSCUSA said:

1. Can you point me to documentation or let us know what to do if we change an Lua program or change the FSUIPC7.ini to retetst the change? Must we restart MSFS from scratch? The changes don't seem to take effect on Flight Restart or creating a new flight from the Main Menu. Time consuming to start MSFS from scratch. 

If you change a lua script, just run it to pick up the changes. if it is already running, when you run it again the currently running script will be killed.

For ini file changes, it depends on what is changed. Some parameters are only read at start-up, others when needed. When changing assignments, you should always do this either with FSUIPC7 not running, or with the relevant assignment panel open, and click to reload the changes after saved.

11 hours ago, DaveSCUSA said:

2. Is there a way to eliminate all Lua traces and still display ipc.log entries?

Just disable logging for Lua Plugins - ipc.log statements will still be logged.

1 hour ago, DaveSCUSA said:

3. Is there a way to compile an Lua plugin outside of MSFS? 

No. Lua scripts are compiled by FSUIPC7 just before being ran, and they are onky ran when FSUIPC7 is connected to MSFS and you have an aircraft ready to fly (i.e. not in the main menus).

Of course, you can use standard lua outside of FSUIPC7, but you will not be able to use the additional lua functions provided by FSUIPC.

John

  • 4 months later...
Posted (edited)

Hello Dave, hello John,

Thanks for your questions and answers.
In the FSUIPC7 manual (FSUIPC Lua Plug-Ins.pdf) I can read :

" FSUIPC recognises all files placed into its installation folder that have filetype “.lua”. These should all be Lua programs, either in normal interpreted source format or in the “compiled” format if desired (Lua provide a compiler “luac.exe”) "

I was used to compile my previous LUA scripts with the Luac.exe compiler (v5.1.5), and it worked fine with FSUIPC5 and 6.

Please could you confirm that the compiled LUA files are no more usable with FSUIPC7, contrary to what is said in the current documentation and as they were before ?

Thanks in advance, and sorry for my English...

Frederic

Edited by Frederic_320
Posted
1 hour ago, Frederic_320 said:

I was used to compile my previous LUA scripts with the Luac.exe compiler (v5.1.5), and it worked fine with FSUIPC5 and 6.

There has been little change in the lua interface between 6 and 7, except for the addition of more functions provided by FSUIPC7.

1 hour ago, Frederic_320 said:

Please could you confirm that the compiled LUA files are no more usable with FSUIPC7, contrary to what is said in the current documentation and as they were before ?

This is new to me! If it was previously like this, it should still be the same, so I don't know why this is not working any more. I will take a look at some point, and either see why this has changed and if it can be corrected, or I will update the documentation.

I am pretty busy at the moment though, and won't have time to look into this for a while. You will have to use the *.lua files rather than the compiled ones

If you compile them outside of FSUIPC, how are you including the lua libraries that FSUIPC provides? Are these available to an external compiler, and if so how?
Or are they linked-in at run-time?

Posted

I tried using a pre-compiled lua and get the following error:
    *** LUA Error: D:\FSUIPC7\Lua\soundTest2.lua: bad header in precompiled chunk

This error is normally due to mismatched compiler versions, but I compiled with 5.1.4 and this is also the version that is built-in to FSUIPC7, so I am not sure what the issue is here.

On 6/3/2024 at 7:08 PM, Frederic_320 said:

Please could you confirm that the compiled LUA files are no more usable with FSUIPC7, contrary to what is said in the current documentation and as they were before ?

I will update the documentation (for the next release) to state that this is no longer possible.

Regards,

John

Posted


Many thanks John for your responsiveness and the clarity of your explanations. I will program my future scripts based on your documentation update, so for now I will leave them in an uncompiled version.

Have a nice week, thanks again.

Frederic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.