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

FS2004 Recalcitrant tooltip string

Messages
1,468
Country
italy
I started doing this this morning and got it to work just with numbers. The numbers are percents so when I added the percent signs everything went pear shaped and I have been unable to get it back to a working code.
Could someone have a look and correct the mistakes, please.
The red items are what I want to see either as text or values. With the values having a % sign added.
Many thanks vololiberista
Code:
<Tooltip>[COLOR="Red"]Engine 1 [/COLOR]%( (A:General eng1 throttle lever position, part) 0 &lt; (A:Turb eng1 N2, percent) 1 &gt; and )%{if}%([COLOR="Red"](A:Turb eng2 N2, percent) 36 + )[/COLOR]%!d!%%{else}%( (A:General eng1 throttle lever position, part) 0 &gt; (A:Turb eng1 N2, percent) 1 &gt; and )%{if}%([COLOR="Red"](A:Turb eng2 N2, percent) near)[/COLOR]%!d!%{end}</Tooltip>
 
Code:
<Tooltip>Engine 1 [COLOR="Red"]%[/COLOR]%( (A:General eng1 throttle lever position, part) 0 &lt; (A:Turb eng1 N2, percent) 1 &gt; and )%{if}%((A:Turb eng2 N2, percent) 36 + )%!d!%%{else}%( (A:General eng1 throttle lever position, part) 0 &gt; (A:Turb eng1 N2, percent) 1 &gt; and )%{if}%((A:Turb eng2 N2, percent) near)%!d!%{end}</Tooltip>

I am assuming that's where you added the % symbol. If so, I believe you need two of them for it to be treated as a literal % symbol. If that's NOT the location... whereever it is in that pile of polish sausage they call XML, I still believe you need two %% for the % to be treated as a literal in a string.
 
Code:
<Tooltip>Engine 1 [COLOR="Red"]%[/COLOR]%( (A:General eng1 throttle lever position, part) 0 &lt; (A:Turb eng1 N2, percent) 1 &gt; and )%{if}%((A:Turb eng2 N2, percent) 36 + )%!d!%%{else}%( (A:General eng1 throttle lever position, part) 0 &gt; (A:Turb eng1 N2, percent) 1 &gt; and )%{if}%((A:Turb eng2 N2, percent) near)%!d!%{end}</Tooltip>

I am assuming that's where you added the % symbol. If so, I believe you need two of them for it to be treated as a literal % symbol. If that's NOT the location... whereever it is in that pile of polish sausage they call XML, I still believe you need two %% for the % to be treated as a literal in a string.

That's what I thought W. I've been putting them everywhere. The problem now is that I'm not even getting the no's. Just Engine 1 :-(
I think polish sausage is a "much" better name !!
vololiberista
 
fpr example this works in one gauge
Code:
<Tooltip>Engine 2 %((A:Turb eng2 N2, percent) near)%!d!%%</Tooltip>
giving me the % sign.
But try as I might in the above code all I get is Engine 1 and nothing else at all.
Sometimes with a bit of fiddling I can get the numbers. But adding the % signs screws everything. I've tried % signs everywhere!!
There has to be a correct solution but, I can't see it at all.
vololiberista
 
I believe there's one "%" too much or too little in the following part:
Code:
%{if}%( (A:Turb eng2 N2, percent) 36 + )%!d![B][COLOR="Red"]%[/COLOR][/B]%{else}
Try either
Code:
%{if}%( (A:Turb eng2 N2, percent) 36 + )%!d![B][COLOR="Red"]%%[/COLOR][/B]%{else}
or displacing the "%%" to the end of the string
Code:
%{if}%( (A:Turb eng2 N2, percent) 36 + )%!d!%{else}
...
%{end}%%
 
Last edited:
Thanks for that! Tried all your permutations including the threesome earlier. No luck at all.
Perhaps the string can't be evaluated.
vololiberista
 
Back
Top