Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can anyone tell me what is wrong with this code? Again.

Featured Replies

Hi all,

Slowly getting to grips with using LINDA for custom actions with switches etc but still having a problem getting my head into reading Lvars and getting returned values to trigger other things like a sound etc.

I think I know enough to know that the code below is wrong but it would help me enormously if someone could correct it. This would lead me onto a greater use of LINDA, even if it just helps the penny to drop.

I have a module file that works well for switches but somehow, I have it in my head that this sort of code should be in the 'user' file and so that is where I have put this...

-- Fuel Alarm --
function Fuel_Alarm()
ftq=readLvar("FUEL_TOTAL_QUANTITY",gallons)
if ftq<=(30) then
alarmf=sound.play("BingoFuel")
sound.adjust(alarmf,-100)
else
end
end

Thanks in advance,

D

if ftq<=(30) then
 

this?

if (ftq<=30) then
 

CASE: Fractal Terra Silver CPU: AMD R5 7800X3D 5.0Ghz RAM: 32GB DDR5 6000 GPU: nVidia RTX 4070 Ti SUPER · SSDs: Samsung 990 PRO 2TB M.2 PCIe · PNY XLR8 CS3040 2TB M.2 PCIe · VIDEO: LG-32GK650F QHD 32" 144Hz FREE/G-SYNC · MISC: Thrustmaster TCA Airbus Joystick + Throttle Quadrant · MSFS2024 · Windows 11

  • Author

Thanks Nuno Pinto for the suggestion. Unfortunately, it hasn't fixed it. I'm thinking that maybe this function should be under one of my switch functions, like the battery on/off function in the actions file.

I'll try that.

D

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.