March 3, 200917 yr I've done several searches in this forum to find an example of what I am trying to do, but I've not found a working solution. Here is my code: <Element> <Select> <Value>(A:NUMBER OF ENGINES, NUMBER)</Value> <Case Value="1">1 (>G:Var1)</Case> <Case Value="2">2 (>G:Var1)</Case> <Case Value="3">3 (>G:Var1)</Case> <Case Value="4">4 (>G:Var1)</Case> </Select> <Position X="180" Y="180"/> <FormattedText X="150" Y="16" Bright="Yes" Length="150" Font="Arial" FontSize="14" LineSpacing="16" Color="#CD8DC5"> <String>Number of Engines: %((G:Var1))%!d!%</String> </FormattedText> </Element> All I'm trying to do at this point is to get my code to show the number of engines detected on the airplane. Right now, the gauge shows 0 where I am attempting to display the # of engines. Thank you.
March 3, 200917 yr Try <Element> <Position X="100" Y="180"/> <Text X="150" Y="14" Bright="Yes" Length="150" Font="Arial" Color="#CD8DC5"> <String>%Number of Engines: %((A:NUMBER OF ENGINES, number))%!d!</String> </Text> </Element> Paul EGLD
March 3, 200917 yr Author Try <Element> <Position X="100" Y="180"/> <Text X="150" Y="14" Bright="Yes" Length="150" Font="Arial" Color="#CD8DC5"> <String>%Number of Engines: %((A:NUMBER OF ENGINES, number))%!d!</String> </Text> </Element>Yes, I know this will work, thank you. This is more an exercise in learning how to write a select case. I want to add more code for each case once I understand the basic syntax of the select case.
March 3, 200917 yr Author After spending some more time in the SDK, I determined how to do what I was trying to do with a case: <String>%Number of Engines: %(4 3 2 1 0 5 (A:NUMBER OF ENGINES, NUMBER) case) %!d!</String>
Create an account or sign in to comment