Raised This Month: $ Target: $400
 0% 

having '%' in a hudmsg ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
noob
Junior Member
Join Date: Jun 2004
Old 06-10-2005 , 15:58   having '%' in a hudmsg ?
Reply With Quote #1

i cant use the %-symbol in a hud-text.. err?
runtime error: "String formatted incorrectly - parameter 4 (total 3)"

Code:
new hudmsg[256], len len = format(hudmsg,255, "^n4^% faster movement") set_hudmessage(255, 255, 255, -1.0, 0.50, 0, 0.0, 5.0, 0.0, 0.5, 1) show_hudmessage(id, hudmsg)

i also tried this but it failed too:
Code:
len = format(hudmsg,255, "^4%s faster movement", "%")
both of the methods work like a dream in client_print and others like that, so whats wrong with the hud?
noob is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-10-2005 , 16:26  
Reply With Quote #2

Won't this work?
Code:
len = format(hudmsg,255, "^n4% faster movement")
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
noob
Junior Member
Join Date: Jun 2004
Old 06-10-2005 , 16:59  
Reply With Quote #3

hmm.. havent tried it
it didnt work in client_print though, but i can try it
ty
noob is offline
noob
Junior Member
Join Date: Jun 2004
Old 06-10-2005 , 17:02  
Reply With Quote #4

didnt work
noob is offline
johnjg75
Veteran Member
Join Date: Mar 2004
Location: Delaware
Old 06-10-2005 , 17:20  
Reply With Quote #5

Code:
new hudmsg[256], len len = format(hudmsg,255, "^n4^%s faster movement","%") set_hudmessage(255, 255, 255, -1.0, 0.50, 0, 0.0, 5.0, 0.0, 0.5, 1) show_hudmessage(id, hudmsg)
__________________
johnjg75 is offline
Send a message via AIM to johnjg75 Send a message via MSN to johnjg75 Send a message via Yahoo to johnjg75
noob
Junior Member
Join Date: Jun 2004
Old 06-10-2005 , 18:54  
Reply With Quote #6

hmmh, doesnt seem to work either
noob is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-10-2005 , 18:57  
Reply With Quote #7

Just write 'percent' then.. :\

http://forums.alliedmods.net/showthread.php?t=663 uses %'s in hud messages.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
noob
Junior Member
Join Date: Jun 2004
Old 06-10-2005 , 19:30  
Reply With Quote #8

YAY, it works now. big thanks v3x
i did it like this:
Code:
len = format(hudmsg,255, "^nFaster movement: 4%")
noob 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 16:46.


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