Raised This Month: $ Target: $400
 0% 

slow % in hud [solved]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
alien
Senior Member
Join Date: Aug 2005
Location: London || Slovakia
Old 10-10-2007 , 22:32   Re: slow % in hud
Reply With Quote #22

Oh now I get it. And I hope I'll be able to explain the problem as English is not my own language.

I'll simplify what you've typed:

PHP Code:
formatex(string[pos], 32-pos"%d %%"floatround(35.333));
client_print(0,print_chat,"%s",string);
set_hudmessage(25500, -1.00.2006.012.0,,, -1);
show_hudmessage(0,string); 
There is a major difference between this:

PHP Code:
client_print(0,print_chat,"%s",string); 
and this:

PHP Code:
show_hudmessage(0,string); 
You first pass your format to formatex function. All %% will become %. Then you pass resulting string as a string parameter to client_print to print it. That's fine.

But when you pass a string into the show_hudmessage, you don't pass it as a string parameter but format itself! It means, that your % in string that was processed by vformat is processed again and is considered not as escape sequence but format initiator.

I assume the solution to that would be:

PHP Code:
set_hudmessage(255255255, -1.0,0.30 06.012.0_,, -1);
show_hudmessage(0"%s"string); 
Check that out, I can't (falling asleep). Hope it helps.
__________________
alien is offline
Send a message via ICQ to alien
 



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 07:59.


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