AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   having '%' in a hudmsg ? (https://forums.alliedmods.net/showthread.php?t=14118)

noob 06-10-2005 15:58

having '%' in a hudmsg ?
 
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? :?

v3x 06-10-2005 16:26

Won't this work?
Code:
len = format(hudmsg,255, "^n4% faster movement")
:?:

noob 06-10-2005 16:59

hmm.. havent tried it :D
it didnt work in client_print though, but i can try it
ty :)

noob 06-10-2005 17:02

didnt work :(

johnjg75 06-10-2005 17:20

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)

noob 06-10-2005 18:54

hmmh, doesnt seem to work either :cry:

v3x 06-10-2005 18:57

Just write 'percent' then.. :\

http://forums.alliedmods.net/showthread.php?t=663 uses %'s in hud messages.

noob 06-10-2005 19:30

YAY, it works now. big thanks v3x :up:
i did it like this:
Code:
len = format(hudmsg,255, "^nFaster movement: 4%")


All times are GMT -4. The time now is 16:46.

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