percent symbol
Hello, before the last cs update percent symbol used to be working with "%%%", and now its don't working. any suggestions?
|
Re: percent symbol
In what context? If you are formatting a string and you want to show a % then you need to escape it with a %. So, "%%" will give you "%". I'm not sure why you are showing three, that doesn't make sense.
|
Re: percent symbol
Quote:
and nothing works.. |
Re: percent symbol
I have checked now and if I do this:
PHP Code:
but if I'm doing this: PHP Code:
how to fix it? |
Re: percent symbol
Does it happen if you don't use colored chat (i.e. use client_print() without any color-based formatting)? If it works without colored chat, there is probably a problem with the colored chat function you are using.
|
Re: percent symbol
Quote:
maybe there is a problem with my code?: PHP Code:
|
Re: percent symbol
Are you using the latest official release of AMX Mod X (v1.8.2)? If you are using the current dev beta, try using the official release instead and see if that changes.
What if you print only str2? does it show the % correctly there? Try this: Code:
ColorChat(0, "(%s+%i%%^1)", rand > 34 ? (won == 1 ? ("^4") : ("")) : ("^1"), percentBonus) |
Re: percent symbol
Try this method:
Quote:
|
Re: percent symbol
Quote:
Quote:
That the result from both suggestions: PHP Code:
|
Re: percent symbol
Try writing str2 to a file and then attach the file to your next post (don't edit or change it in any way before attaching it).
|
| All times are GMT -4. The time now is 06:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.