comp_uter15776 1 Posted July 23, 2013 Hey all, Lovely title don't you think? My issue directly pertains to the Sector Command(s) issue, and arose when I tried to display both teams' tickets remaining. So far I've found both Hints and Titletext to be a problem, and so I have arrived back at the forums for help. This is from an MP aspect. I would like to show something along the lines of the below: Blufor Tickets - <tickets> Opfor Tickets - <tickets> In either a hint, titletext, or even chat. My issue is also that tickets are stored as a numerical value (data type number) and so obviously I can't concatenate a string and a number. How would I successfully convert it to a string first and then concatenate both strings together? Use of str was problematic for me, perhaps I wasn't using it right. If anyone could land some examples or even a simple explanation of what to do or where I'm going wrong would be greatly appreciated. Regards, Harry Share this post Link to post Share on other sites
kylania 567 Posted July 23, 2013 hint format["Blufor tickets - %1", _bluforTickets]; // prints: PlayerName: 3 player sideChat str(_bluforTickets); Assuming _bluforTickets is a Number. Share this post Link to post Share on other sites
comp_uter15776 1 Posted July 23, 2013 OWTTE :) Easily changed. Thank you, kylania. How would I prepend a string before that though, it doesn't seem to like something like the following: player sideChat Blufor tickets at str(_bluforTickets); Share this post Link to post Share on other sites
kylania 567 Posted July 23, 2013 Format generally. player sideChat format["Blufor tickets at %1", _bluforTickets]; Str() just returns the string value of a number so str(6) would be "6" instead of 6. You could also do this: player sideChat "Blufor tickets are at " + str(_bluforTickets); Share this post Link to post Share on other sites
comp_uter15776 1 Posted July 23, 2013 Great, just what I needed :) Works perfectly! Thanks again, Harry Share this post Link to post Share on other sites