Archived

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

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
Help AVSIM continue to serve you!
Please donate today!

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

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.

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... *:-*

Share this post


Link to post
Share on other sites