View Single Post
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-21-2015 , 10:01   Re: % in string text
Reply With Quote #8

If you need to print text that you've already formatted, pass it as a String argument to a format-class function.

For example:

Code:
char myString[32];
Format(myString, sizeof(myString), "%s", "5%");
PrintToChatAll("%s", myString);
This example is really contrived, but there are other reasons to do it. I ended up fixing a bug in colors.inc that was doing double formatting this way.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline