Dear friends,
I'm trying to set my autopilot panel for using with Aerosoft CRJ via FSUIPC7 7.0.8 and Mobiflight.
For that I (and a friend of mine more experienced with) trying to write a ASCRJ.lua file including few LVARS for testing.
First step we will test the APPR led on state by using Offset 0x6800
We do not undestand why at simulator and FSUIPC7 launch in fsuipc7.log appears this error and lua macro does not operate: 246266 *** LUA Error: D:\MSFS_Mobiflight\FSUIPC7\ASCRJ.lua:44: attempt to call field 'Lvar' (a nil value)
The error line is the first line in AUTOPILOT OUTPUTS in ASCRJ.lua event.Lvar("ASCRJ_FCP_APPR_LED", lvps, "ASCRJ_FCP_APPR_LED") -- (enum) | offset = 0x6800 | type = int | size = UB, 1 | mask = 0xFF
if I remark this line in ASCRJ.lua the error comes at next line:
event.Lvar("ASCRJ_FCP_BC_LED", lvps, "ASCRJ_FCP_BC_LED") -- (enum) | offset = 0x6801 | type = int | size = UB, 1 | mask = 0xFF
Just verified the local variable name ASCRJ_FCP_APPR_LED
Also we suspect a syntax error but we dont know what.
If possible could You please take a look at the attached files (ASCRJ.lua, CRJ-LVARS.txt, FSUIPC7.ini, FSUIPC7.log) and supply me a suggestion ?
Thanks in advance
ASCRJ.lua
CRJ-LVARS.txt
FSUIPC7.ini
FSUIPC7.log