PilotsDeck
PilotsDeck copied to clipboard
LUA - A: and E: Variables
Hello, as I am now experimenting with the new built in lua functionality, I am facing issues with reading A: and E: variables. L: vars work as expected :-)
Actually I want to read the Transponder (A:TRANSPONDER CODE:1, number) and the Sim rate (E:SIMULATION RATE, number).
I followed your very helpful example https://github.com/Fragtality/PilotsDeck/issues/63#issuecomment-2158855536 and used following:
SimVar("(A:TRANSPONDER CODE:1, number)")
function XPNDR_CODE() local xcode = SimRead("(A:TRANSPONDER CODE:1, number)") return xcode end
but is returns nothing.
if I enter (A:TRANSPONDER CODE:1, number) directly in the plugin, it works as expected.
What the hell am I doing wrong? :-)
Cheers, Sebastian