• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA Formatting problem

Dutcheeseblend

Resource contributor
Messages
1,541
Country
netherlands
Hi all,

Recently I downloaded the Grumman S2F-1 Tracker from the Outhouse Team (from the SOH), but when I select it in FSX, I get multiple errors. I solved most of them, except of this one:
upload_2016-11-21_16-56-35.png


The gauge where the problem is, is as follows:

Code:
<Gauge Name="xpndr radio" Version="1.0">
  <Image Name="Radio IFF.bmp"/>
   <Element>
         <MaskImage Name="Xpndr_Mask.bmp"/>
         <Position X="217" Y="89"/>
         <Image Name="Radio IFF Strip.bmp" Luminous="Yes"/>
      <Shift>
         <Value Minimum="0" Maximum="7">(A:TRANSPONDER1 CODE, number) 1000 / int )%!1d!</Value>
         <Scale Y="-33"/>
         <Delay PixelsPerSecond="55"/>
       </Shift>
    </Element>

    <Element>
         <MaskImage Name="Xpndr_Mask.bmp"/>
         <Position X="256" Y="89"/>
         <Image Name="Radio IFF Strip.bmp" Luminous="Yes"/>
      <Shift>
         <Value Minimum="0" Maximum="7">(A:TRANSPONDER1 CODE, number) 1000 % d 100 / int )%!1d!</Value>
         <Scale Y="-33"/>
         <Delay PixelsPerSecond="55"/>
       </Shift>
   </Element>
   <Element>
         <MaskImage Name="Xpndr_Mask.bmp"/>
         <Position X="297" Y="89"/>
         <Image Name="Radio IFF Strip.bmp" Luminous="Yes"/>
      <Shift>
         <Value Minimum="0" Maximum="10">(A:TRANSPONDER1 CODE, number) 100 % d 10 / int )%!1d!</Value>
         <Scale Y="-33"/>
         <Delay PixelsPerSecond="55"/>
       </Shift>
   </Element>

   <Element>
         <MaskImage Name="Xpndr_Mask.bmp"/>
         <Position X="337" Y="89"/>
          <Image Name="Radio IFF Strip.bmp" Luminous="Yes"/>
      <Shift>
         <Value Minimum="0" Maximum="7">(A:TRANSPONDER1 CODE, number) 10 % )%!1d!</Value>
         <Scale Y="-33"/>
         <Delay PixelsPerSecond="55"/>
       </Shift>
    </Element>
  <Mouse>
     <Tooltip ID="TOOLTIPTEXT_TRANSPONDER_ID"/>
       <Area Left="216" Right="240" Top="16" Bottom="156">
             <Click Event="XPNDR_1000_INC" Repeat="Yes"/>
             <Cursor Type="UpArrow"/>
          </Area>
       <Area Left="256" Right="281" Top="16" Bottom="156">
             <Click Event="XPNDR_100_INC" Repeat="Yes"/>
             <Cursor Type="UpArrow"/>
          </Area>
       <Area Left="297" Right="323" Top="16" Bottom="156">
             <Click Event="XPNDR_10_INC" Repeat="Yes"/>
             <Cursor Type="UpArrow"/>
          </Area>
       <Area Left="336" Right="363" Top="16" Bottom="156">
             <Click Event="XPNDR_1_INC" Repeat="Yes"/>
             <Cursor Type="UpArrow"/>
          </Area>
   </Mouse>
</Gauge>

I tried everything of formatting the bolded lines, but none of them gives a solution. Does anybody have an idea?

Thank you!

Daan
 
There are string print commands attached to an evaluation where all that needs returned is the evaluated number.
Removing all )%!1d! characters in each <Value> tag should do it.
Ex. snipped

Code:
<Value Minimum="0" Maximum="7">(A:TRANSPONDER1 CODE, number) 1000 / int</Value>
..
<Value Minimum="0" Maximum="7">(A:TRANSPONDER1 CODE, number) 1000 % d 100 / int</Value>
..
<Value Minimum="0" Maximum="10">(A:TRANSPONDER1 CODE, number) 100 % d 10 / int</Value>
..
<Value Minimum="0" Maximum="7">(A:TRANSPONDER1 CODE, number) 10 %</Value>
 
Last edited:
If the end result is to display the transponder digits, then would you not have to use a <Text> <String> statement?

Code:
               <Text X="90" Y="60" Bright="Yes" Length="4" FontSize="44" Font="DS-Digital Bold" Color="#EC802F" Fixed="Yes" Adjust="Center" VerticalAdjust="Top" Multiline="No">
                  <String>%((A:TRANSPONDER1 CODE, number) 1000 / int)%!1d!</String>
               </Text>
 
There are string print commands attached to an evaluation where all that needs returned is the evaluated number.
Removing all )%!1d! characters in each <Value> tag should do it.
Ex. snipped

Code:
<Value Minimum="0" Maximum="7">(A:TRANSPONDER1 CODE, number) 1000 / int</Value>
..
<Value Minimum="0" Maximum="7">(A:TRANSPONDER1 CODE, number) 1000 % d 100 / int</Value>
..
<Value Minimum="0" Maximum="10">(A:TRANSPONDER1 CODE, number) 100 % d 10 / int</Value>
..
<Value Minimum="0" Maximum="7">(A:TRANSPONDER1 CODE, number) 10 %</Value>

That did it! Thank you, I was mildly confused by the presence of these characters.

If the end result is to display the transponder digits, then would you not have to use a <Text> <String> statement?

Code:
               <Text X="90" Y="60" Bright="Yes" Length="4" FontSize="44" Font="DS-Digital Bold" Color="#EC802F" Fixed="Yes" Adjust="Center" VerticalAdjust="Top" Multiline="No">
                  <String>%((A:TRANSPONDER1 CODE, number) 1000 / int)%!1d!</String>
               </Text>

Probably. But they apparently wanted to do it with a number strip, moving down- and upward.
 
Ah yes, in that case no <String> would be necessary. All xpndr codes are limited to 0 through 7, so why is the third expression using Minimum="0" Maximum="10"... :confused:
 
;) Noticed that too.. Just let it go as there will be no return from xpndr that will be outside the value min/max attribute entries. IMO they are not even necessary.
 
Back
Top