Search found 2267 matches

by JackZ
Fri Aug 18, 2023 11:37 am
Forum: Lua and API Scripting Help
Topic: MSFS2020 Lvar write?
Replies: 8
Views: 2173

Re: MSFS2020 Lvar write?

Reading your thread on the support ticket with Just flight, your problem could be that the f2020_write() is so fast that it is not taken into account. Lua is fast! A quick and dirty solution would be to fire the same event/write a couple of time in sequence using a for … loop instead of only once Ex...
by JackZ
Fri Aug 18, 2023 11:21 am
Forum: Lua and API Scripting Help
Topic: MSFS2020 Lvar write?
Replies: 8
Views: 2173

Re: MSFS2020 Lvar write?

Lvars are specific to an addon. They are addressed differently from the « standard » (Simconnect) variables. L: in front of the name of the var itself is what tell AM to use an LVar instead of a Var. So your main problem is to find the proper LVar that actually works for your addon. Not ALL the fonc...
by JackZ
Sun Aug 13, 2023 2:42 am
Forum: Lua and API Scripting Help
Topic: Digital AGL gauge
Replies: 28
Views: 5546

Re: Digital AGL gauge

Yeah the IPhone autocorrect feature has never been designed for Lua programming
Good catch Gilles!
by JackZ
Fri Aug 11, 2023 6:25 pm
Forum: Lua and API Scripting Help
Topic: Digital AGL gauge
Replies: 28
Views: 5546

Re: Digital AGL gauge

Hi
Your code was wrong for starters. You didn’t use the variable agl in the function but instead FEET which was interpreted as nil.
Normally the modified script I published will work?
by JackZ
Fri Aug 11, 2023 2:06 pm
Forum: Lua and API Scripting Help
Topic: Digital AGL gauge
Replies: 28
Views: 5546

Re: Digital AGL gauge

Instead of “RADIO HEIGHT” that might not work all the time, try “PLANE ALT ABOVE GROUND”, “Feet”. This one should work EDIT. Got the error - - -- Add images in Z-order -- img_add_fullscreen("BkGrd.png") -- Add text -- txt_agl = txt_add(" ", "size:45px; color:#FFFFFF; halign:...
by JackZ
Fri Aug 11, 2023 2:01 pm
Forum: Lua and API Scripting Help
Topic: Digital AGL gauge
Replies: 28
Views: 5546

Re: Digital AGL gauge

Are you still using FSX? Or MSFS? Because there is a different subscribe function
by JackZ
Thu Aug 10, 2023 7:39 pm
Forum: Air Manager
Topic: A2A Comanche lvar list released
Replies: 8
Views: 2090

Re: A2A Comanche lvar list released

Good idea, Gilles, but I guess the OP wants the « old style » weird instrument layout of the Comanche as well. And some gauges are specific to this aircraft. Not to mention the Autopilot coupled with the Turn & Slip indicator. STEC S-30 2 axis Autopilot and the most complicated the JPI 830 EDM Q...
by JackZ
Thu Aug 10, 2023 2:12 pm
Forum: Air Manager
Topic: A2A Comanche lvar list released
Replies: 8
Views: 2090

Re: A2A Comanche lvar list released

Thank you for the info, but the Comanche is a very rare aircraft, there’s a very slim chance that it will be developed anytime soon.
by JackZ
Wed Aug 09, 2023 12:10 pm
Forum: Lua and API Scripting Help
Topic: Show_hide script error
Replies: 12
Views: 2676

Re: Show_hide script error

Thanks.. Also realise the number in error msg is the line number, so any ideas on whats wrong with if flapslever_id ~= nil and fuelselect_id ~= nil then (Error msg is - ERROR - logic.lua:10: <name> expected near 'if' ) local show_hide = false flapslever_id = instrument_get("291147a5-b787-4dd0-...
by JackZ
Tue Aug 08, 2023 4:52 pm
Forum: Lua and API Scripting Help
Topic: Show_hide script error
Replies: 12
Views: 2676

Re: Show_hide script error

A Lua function has parenthèses with the parameters inside z_order(flapslever_id, 1) z_order(fuelselect_id, 2) will work Same concept applies for the rest of your code. You type the Lua function first(here z_order), then the parameters: 1- the item concerned (here flapslever_id), then 2- the value (t...