• 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.

This just doesn't add up!

Messages
261
Country
ireland
Hi

I have an XML gauge which contains the following:

<String>%((L:PassengersEcon, number) 206.0 * )%!6d!</String>

If L:PassengersEcon holds 5 then the answer comes out at 1127.

If L:PassengersEcon holds 83 then the answer comes out at 17006.



Getting out my normally trustworthy Casio calculator I make the answers out to be 1030 and 17090. (I did it more than once to make sure!)

It probably suits me better that the answer in the formula above is 'slightly' unpredictable, but I would like to know if other calculations within XML are equally unreliable.

Is there a way that the formula might have been made more accurate?

Have I fouled up in the formula?

Thanks

Walter
 
Check your (L:PassengersEcon, number) variable's values.
I'm pretty sure that
<String>%((L:PassengersEcon, number))%!1.2f!</String>
will give 5.47 and 82.55 for the two examples.
 
Thanks Teson1.

I checked my code as you recommended.

During my randomising procedure for passenger numbers I had a flr in the wrong position in the code line.

Now, with a minor modification to the code, I have 'whole' passengers and weights working out as I expected them to.

Thanks.

Walter
 
Back
Top