Airbuspilot Posted July 24, 2017 Report Posted July 24, 2017 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
Pete Dowson Posted July 25, 2017 Report Posted July 25, 2017 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
Airbuspilot Posted July 25, 2017 Author Report Posted July 25, 2017 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
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