Jump to content
Sign in to follow this  
igneous01

show combined strings in briefing/structured text?

Recommended Posts

How do I get this to properly show? I am trying to make a basic medical assessment report that follows this format:

MAIN TITLE

Wounded:

- list of names

Critical Condition:

- list of names

I am storing separate parts of the string into variables, and adding them all together later to create the final string.

Here is the code of the string variables being created:

_reportTitleMain = "MEDICAL ASSESSMENT & REPORT <br/> <br/> <br/>";
_reportTitle1 = "Small Wounds: <br/> <br/>";
_reportWounded = "";
{_reportWounded = _reportWounded + (format ["%1 <br/>", name _x])} foreach WoundedUnits;
_reportTitle2 = "<br/>Critical Condition: <br/> <br/>";
_reportCritical = "";
{_reportCritical = _reportCritical + (format ["%1 <br/>", name _x])} foreach CriticalUnits;
_report = _reportTitleMain + _reportTitle1 + _reportWounded + _reportTitle2 + _reportCritical;

I tried showing _report inside both the briefing diary and using a dialog with structured text. Both of them display this instead:

MEDICAL ASSESSMENT & REPORT ?

and thats it.

How do I have it properly display the entire text? Is there some other method for joining strings? (maybe I did it wrong)

EDIT**

This issue has been solved :D

It turns out you cannot use '&' inside strings, it stops showing the rest of the string where ever symbols like & or % are placed. So as a useful reminder, if you see a question mark shown in your string, you are using invalid characters.

Edited by Igneous01

Share this post


Link to post
Share on other sites

This issue has been solved :D

It turns out you cannot use '&' inside strings, it stops showing the rest of the string where ever symbols like & or % are placed. So as a useful reminder, if you see a question mark shown in your string, you are using invalid characters.

Because the briefing is some kind of a HTML hack, I would assume ampersand (& sign) causes problems, because in HTML you use it to start a keyword for other signs/characters. I don't know if Arma has the support as well, but you can try:

http://rabbit.eng.miami.edu/info/htmlchars.html

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×