ark1320 Posted March 23, 2019 Report Posted March 23, 2019 At the end of a flight I'd like to use a Lua script to save a small number of offset values (fuel tank quantities) to be read and loaded at the next sim session. As far as I can tell there are no special facilities for this in the FSUIPC lua library, so I assume I will need to learn how to use standard Lua io methods for reading and writing files. If anyone has any recommendations on how best to proceed or where to look for good examples, that would be most appreciated. Thanks, Al
Pete Dowson Posted March 23, 2019 Report Posted March 23, 2019 1 hour ago, ark1320 said: At the end of a flight I'd like to use a Lua script to save a small number of offset values (fuel tank quantities) to be read and loaded at the next sim session. As far as I can tell there are no special facilities for this in the FSUIPC lua library, so I assume I will need to learn how to use standard Lua io methods for reading and writing files. The "FSUIPC Lua library" is a collection of ADDED functions relating to its job of interfacing to the simulator. All the standard Lua libraries are also incorporated. Those functions are obviusly not re-documented in the supplied FSUIPC documents because they are better explained in the original texts and freely accessible directly on the Lua website, to which a reference is shown prominently. 1 hour ago, ark1320 said: If anyone has any recommendations on how best to proceed or where to look for good examples, that would be most appreciated. Look in the Lua Examples ZIP file in your FSUIPC Documents subfolder. Proably the one which springs to mind most obviously is the "record to CSV" example, which both reads offsets and writes to a file. Reading files and writing to offsets is just as easy. Pete
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now