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.

Quick question to save time...

Featured Replies

Hi all,

And this week's question is:

If I am testing a button state and I am using x = ipc.testbutton(2, 11) and as the library says, the return will be either TRUE or FALSE, would I then put...

if  (x == TRUE) then

or

if (x == "TRUE") then

or, am I asking the wrong question?

Here's the whole chunk...

function switchcon ()
x = ipc.testbutton(2, 11)
if (x == TRUE) then
function fuelchecka ()
function fuelcheckb ()
end
if (x == FALSE) then
sound.stop("Warning_Fuel_Tone")
sound.stop("Warning_Fuel")
end
end

Thanks in advance,

G

LUA is case sensitive. Use

if val == true then

or

if val == false then

 

Edited by ScotFlieger

Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

  • Author

Thank you once again, that was the issue, lower case not caps. It is expressed as caps in the .lua library document so that's my excuse this time around.

Thanks again,

G

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.