Jump to content
Sign in to follow this  
n4gix

String Code Help

Recommended Posts

Hi All,I've been trying to combine different changes of some A:var codes into one string and it doesn't show anything but a 0 "zero". Here is the code I have without all the particulars. Do I need to add more "if"'s or "els"'s?Please help.%((A:code1) 50 < if{ (A:code2) 2 * } (A:code1) 60 < (A:code1) 50 >= & if{ (A:code2) 3 * } (A:code1) 70 < (A:code1) 60 >= & if{ (A:code2) 4 * } (A:code1) 80 < (A:code1) 70 >= & if{ (A:code2) 5 * } (A:code1) 80 > if{ (A:code2) 6 * })%!4d!BTW: If I put just one segment into the string it works for that particular event, such as: %((A:code1) 60 < (A:code1) 50 >= & if{ (A:code2) 3 * })%!4d!So, I know the code is correct - but not when put together.Thanks in advance,Benny

Share this post


Link to post
Share on other sites

Hello Benny Try %((A:code1) 50 < if{ (A:code2) 2 * } 51 60 (A:code1) rng if{ (A:code2) 3 * } 61 70 (A:code1) rng if{ (A:code2) 4 * } 71 80 (A:code1) rng if{ (A:code2) 5 * } (A:code1) 81 > if{ (A:code2) 6 * })%!4d! not tested


Paul EGLD

Share this post


Link to post
Share on other sites

Thanks PVE,I plugged in my numbers and away she went!!! Perfectly.One question please. What exactly does the "rng" in the code do? I couldn't find it in my notes from Arne Bartels, or maybe I've overlooked it.Thanks again,Benny

Share this post


Link to post
Share on other sites

Hello Benny Glad you got it working, rng is range ie. 40 to 50 counts all numbers inside. Or rng ! excluding all numbers inside.


Paul EGLD

Share this post


Link to post
Share on other sites

One of the things that isn't explained anywhere in the SDK is that the syntax rules for XML logic is entirely different than from that used elsewhere in the XML gauge script... *:-*


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...