Thanks John,
Ok, so I have one lua file placed in the FSUIPC directory named Q400.lua (containing the code I quoted in my first post. This handles the Majestic XML writing to one LVAR and reading return from another Lvar)
The "reading result from another lvar", is that referring to Q400_YD_LIGHT ?
Global variable, I think in translation I have taken to mean another Lvar eg Q400_YD_LIGHT
I am using p3dv6 and from what I understand mobiflight only uses the WASM/sim connect module for FS2020 to be able to read Lvars in mobiflight. Either that or I can't get sim connect to work with mobiflight (get list of lvars doesnt work)
So at this stage I am limited to using FSUIPC offsets for my outputs.
Now to get the "Q400_YD_LIGHT into a free offset that I can read in mobiflight...
I have another separete .lua in the FSUIPC directory named yd_on.lua containing this:
function yd_on (var, value)
ipc.writeUB ("66C0", value)
end
event.Lvar ("L:Q400_YD_LIGHT", 100, "yd_on", value)
The idea being that then I should be able to read the 66C0 offset in mobiflight.
1) Do I also need to auto-run both lua files in the [Auto] section of fsuipc.ini?
Hope I am on the right track here