Raised This Month: $ Target: $400
 0% 

Showing %


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MrDev
Member
Join Date: Sep 2005
Old 09-30-2005 , 11:02   Showing %
Reply With Quote #1

Is it possible to show the percent sign in a string in cs. Like:

new msg[256]
format(msg,255,"[BLABLA 30%")

I've tryed with '%' and insetting %s,'%' but no luck.
MrDev is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 09-30-2005 , 11:29  
Reply With Quote #2

Code:
new msg[256] format(msg, 255, "Blah Blah %i%", yourInteger)
This should work.
__________________
Brad is offline
MrDev
Member
Join Date: Sep 2005
Old 09-30-2005 , 11:41  
Reply With Quote #3

Im afraid it doesn't -- Maybe the problem lies in the:

message_begin(MSG_ONE,gmsgStatusText,{0,0,0}, i)
write_byte(0)
write_string(msg)
message_end()

Unable to show '%'
MrDev is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 09-30-2005 , 11:41  
Reply With Quote #4

wrong

to use an % you can do this

Code:
 new msg[256] format(msg, 255, "Blah Blah %c", '%' )

or

Code:
 new msg[256] format(msg, 255, "Blah Blah %%" )

Regards
Greenberet
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
MrDev
Member
Join Date: Sep 2005
Old 09-30-2005 , 12:04  
Reply With Quote #5

Still doesn't work. I'm beginning to believe that you can't add '%' in gmsgStatusText
MrDev is offline
MrDev
Member
Join Date: Sep 2005
Old 09-30-2005 , 12:13  
Reply With Quote #6

Got it to work. %s in format with "%%" as param
MrDev is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:00.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode