PilotsDeck icon indicating copy to clipboard operation
PilotsDeck copied to clipboard

LUA - A: and E: Variables

Open jimdabim opened this issue 8 months ago • 4 comments

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. image

What the hell am I doing wrong? :-)

Cheers, Sebastian

jimdabim avatar Jun 18 '24 08:06 jimdabim