Most of the commonly reported issues and questions are answered in the Frequently Asked Questions (FAQ) option under the Support menu of this website.
*** PLEASE NOTE ***
Your forum account is not the same as the account used in the shop. They are completely separate accounts.
Your forum account is not the same as the account used in the shop. They are completely separate accounts.
1st December: A new version of the GoFlight Interface Tool for MSFS is now available.
12th November: A new version of the GoFlight Interface Tool for X-Plane is now available.
6th June: A new version of Virtual Flight Sim Hardware is now available (huge update)
21st November: A new version of the GoFlight Interface Tool for FSX/FSXSE/P3D is now available.
Is a PMDG Bespoke Event possible
Hello, since for MSFS PMDG B737 no Detective is available how can I issue a bespoke event with known variables, eg. 7X7X_Ground_Power_Light_Connected & 7X7X_Ground_Power_Light_NotInUse. Have seen the values 0 and 1 vs. 1 and 0 in Developer Mode under Local Variables and like to set them onto two P8 Module Lights. 7X7X_Ground_Power_Light_Connected & 7X7X_Ground_Power_Light_NotInUse did not appearing under LightData although there are in use. Or can I set them manually into the PMDG SDK list (and how)? Best regards Ralf
Answers
Best wishes
Steve
Replace getkvar with getlvar.
Best wishes
Steve
if "7X7X_Ground_Power_Light_Connected" is = 0 and "7X7X_Power_Door is = 1" then "7X7X_Ground_Power_Light_NotInUse" is = 1 //External Power Off but Connected
else = "7X7X_Ground_Power_Light_NotInUse" = 0 //External Power On or External Power Disconnected
How can I translate this into LUA in order to get a bespoke Lvar for "7X7X_Ground_Power_Light_NotInUse" with values 1 or 0 for a light indication only (no switching function required)? Best regards Ralf
The "while do end" loop ensures the statements run continuously after a 1 second pause (sleep).
Best wishes
Steve
print(getlvar("7X7X_Ground_Power_Light_Connected"))
Remember to save the script and then you can run it in the Lua console and its current value will be show in the output area of the lua console.
Best wishes
Steve
Lua Connected!
Lua Error Code 1: Running File C:\USERS\xyz\DOCUMENTS\GOFLIGHT INTERFACE TOOL\LUA\PMDG 737\CHECK_OUTPUT.LUA
Error: ...TS\GOFLIGHT INTERFACE TOOL\LUA\PMDG 737\CHECK_OUTPUT.LUA:1: getlvar: C++ Exception Thrown - Unknown Local Variable Name, 7X7X_Ground_Power_Light_NotInUse
Lua Error Code 1: Running File C:\USERS\xyz\DOCUMENTS\GOFLIGHT INTERFACE TOOL\LUA\PMDG 737\CHECK_OUTPUT.LUA
Error: ...TS\GOFLIGHT INTERFACE TOOL\LUA\PMDG 737\CHECK_OUTPUT.LUA:1: getlvar: C++ Exception Thrown - Unknown Local Variable Name, 7X7X_Ground_Power_Light_Connected
Lua Error Code 1: Running File C:\USERS\xyz\DOCUMENTS\GOFLIGHT INTERFACE TOOL\LUA\PMDG 737\CHECK_OUTPUT.LUA
Error: ...TS\GOFLIGHT INTERFACE TOOL\LUA\PMDG 737\CHECK_OUTPUT.LUA:1: getlvar: C++ Exception Thrown - Unknown Local Variable Name, 7X7X_Power_Door
Lua Error Code 1: Running File C:\USERS\xyz\DOCUMENTS\GOFLIGHT INTERFACE TOOL\LUA\PMDG 737\CHECK_OUTPUT.LUA
Error: ...TS\GOFLIGHT INTERFACE TOOL\LUA\PMDG 737\CHECK_OUTPUT.LUA:1: getlvar: C++ Exception Thrown - Unknown Local Variable Name, DATA_FWDOH_AIR_SWITCH_L_PACK
The first scriptexample is working, also notepad is used for editing. checked LUA Manual for Lua Error Code 1 but no luck. Is there something I can do further?
Any variables beginning with DATA are SDK variables so use getkvar instead of getlvar.
Best wishes
Steve
After Starting MSFS and GIT and LUA code assignement, the Lvars were wiped out of the KnownLvars.xml file. The Lvars are not visible in LUA console and the error message is the same as above, it is not working. For the getkvar function I found in the Online LUA description that it is not available in GIT FS2020. So it seems that PMDG B737 in FS2020 did not accept any additional entry, at least for me... (tried with knownlavars.xml writing protection too, but the error message is the same) Best regards Ralf
I suspect support for the PMDG is limited in both Lua and Detective because the SDK was doing all the work. I'll need to go over all the code to see what is happening.
Best wishes
Steve