Don't let this happen to you
Continuing on the theme of displaying text in an XML gauge, I just spent more time than I would like to admit trying to figure out why this script wasn't working for me:
%( (A:ATC ID) )%!s!
The problem, of course (which I only resolved by stepping into the depths of the stack-calculator code), was that I was missing the UNITS for this simvar. Yes, "ATC ID", which is a string, requires UNITS. UNITS! Argh. So I changed it to this:
%( (A:ATC ID, string) )%!s!
and I was on my merry way.
So learn from my stupid mistakes! Don't do this! Don't forget that all "A:" variables require units! See my post on "An alphabet worth of variables" for which types require units. And I just added an assert (which we can hopefully upgrade to some kind of error message that end users can see) so that I at least won't suffer from my own stupidity in this arena again.