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.

Ifs are broken and I can't fix it

Featured Replies

FS9 xml; Below, the variable (L:Agauge_ControlValue, number) is increased/decreased in mouse click section. In the other gauge code, IF-lines 0 through 9 store the correct values in the three variables Left, Ctr, and Right as the ControlValue variable is changed. However, when the IF-line comparing (l1 10 ==) is added to code, stored values suddenly become incorrect. Left becomes a zero, Ctr stays 1000, and Right becomes 21. They retain these values no matter what value the ControlValue variable is changed to. What happens when the additional line is added to cause this and how do I overcome the problem because I need comparisons through (l1 25 ==). (L:Agauge_ControlValue, number) s1l1 0 == if{ 2 (>L:Agauge_Left, number) 1000 (>L:Agauge_Ctr, number) 1 (>L:Agauge_Right, number) }l1 1 == if{ 4 (>L:Agauge_Left, number) 1000 (>L:Agauge_Ctr, number) 3 (>L:Agauge_Right, number) }l1 2 == if{ 6 (>L:Agauge_Left, number) 1000 (>L:Agauge_Ctr, number) 5 (>L:Agauge_Right, number) }l1 3 == if{ 8 (>L:Agauge_Left, number) 1000 (>L:Agauge_Ctr, number) 7 (>L:Agauge_Right, number) }l1 4 == if{ 10 (>L:Agauge_Left, number) 1000 (>L:Agauge_Ctr, number) 9 (>L:Agauge_Right, number) }l1 5 == if{ 12 (>L:Agauge_Left, number) 1000 (>L:Agauge_Ctr, number) 11 (>L:Agauge_Right, number) }l1 6 == if{ 14 (>L:Agauge_Left, number) 1000 (>L:Agauge_Ctr, number) 13 (>L:Agauge_Right, number) }l1 7 == if{ 16 (>L:Agauge_Left, number) 1000 (>L:Agauge_Ctr, number) 15 (>L:Agauge_Right, number) }l1 8 == if{ 18 (>L:Agauge_Left, number) 1000 (>L:Agauge_Ctr, number) 17 (>L:Agauge_Right, number) }l1 9 == if{ 20 (>L:Agauge_Left, number) 1000 (>L:Agauge_Ctr, number) 19 (>L:Agauge_Right, number) }l1 10 == if{22 (>L:Agauge_Left, number) 1000 (>L:Agauge_Ctr, number) 21 (>L:Agauge_Right, number) }Thanks,Glenn

The problem was no space in this line between bracket and 22 digits.l1 10 == if{22 (>L:Agauge_Left, number) 1000(>L:Agauge_Ctr, number) 21 (>L:Agauge_Right, number) }Glenn

  • Commercial Member

Or, if all those ifs drive you crazy:22 20 18 16 14 12 10 8 6 4 2 11(L:Agauge_ControlValue, number) case d (>L:Agauge_Left, number) 1 - (>L:Agauge_Right, number)1000 (>L:Agauge_Ctr, number) :)--Jon

Perfect,I was hoping someone would suggest a better way to write all that code. I'll paste that into my little book.Thanks,Glenn

Create an account or sign in to comment

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.