Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Need Help about the attached Scripts.

In P3Dv3 with FSUIPC 4.9xx they worked well. Now in P3Dv4 with FSUIPC 5.103 the Following Error occured:

318797 *** LUA Error: ...\Simulatoren\Fliegen\P3Dv4\Modules\B777FuelInput.lua:6: attempt to index global 'file' (a nil value)

Please have a look at the attached FSUIPC5.log. Maybe you can provide some Help.

Thanks in Advance

 

FlightLog.lua

B777FuelInput.lua

FSUIPC5.log

Posted
20 hours ago, Airbuspilot said:

In P3Dv3 with FSUIPC 4.9xx they worked well. Now in P3Dv4 with FSUIPC 5.103 the Following Error occured:

318797 *** LUA Error: ...\Simulatoren\Fliegen\P3Dv4\Modules\B777FuelInput.lua:6: attempt to index global 'file' (a nil value)

A brief look at the Lua file involved shows "file" being set as follows:

file = io.open("e:\Temp\Flusis\B777InitialFuelQty.txt", "r")

So a value of "nil" just means the file.open attempt failed. You should really check for such an error in your script.

The likely reason it failed is that within strings in Lua the \ character is an escape character, allowing all sorts of controls to be added, like \n for "newline2. To get a true \ you must use \\, so:

file = io.open("e:\\Temp\\Flusis\\B777InitialFuelQty.txt", "r")

Check, of course, that the file is actually there!

Pete

 

Posted
5 hours ago, Pete Dowson said:

file = io.open("e:\\Temp\\Flusis\\B777InitialFuelQty.txt", "r")

Hi Pete,

thanks for your Help. That brought the Solution.

 

Joachim

 

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.