Page 1 of 1

[Solved]HudMessage multiple strings + variable problem

PostPosted: Sun Sep 16, 2018 12:49 pm
by Collegia Titanica
So I wanted to print text and the variable value like "N Factor: numvalue" but it only prints N, I followed the wiki example, don't see why it only prints the N value but not the text. I could always use 2 prints and coordinate them but I shouldn't have to.

Code: Select allExpand view
HudMessage(s:"N Factor: ", d:N ; HUDMSG_PLAIN | HUDMSG_NOTWITHFULLMAP, 0, CR_GRAY, 0.2, 0.3, 0);

Re: HudMessage multiple strings + variable problem

PostPosted: Sun Sep 16, 2018 3:05 pm
by kodi
You're not using INDEXFONT as your font right? Or some other custom one that only has numbers.

Re: HudMessage multiple strings + variable problem

PostPosted: Sun Sep 16, 2018 8:47 pm
by Collegia Titanica
Holy shit! That was the problem ! Only numbers in the current font.I never would have guessed, thanks

Re: [Solved]HudMessage multiple strings + variable problem

PostPosted: Mon Sep 17, 2018 1:30 am
by Enjay
Glad you got it sorted but this is a perfect example of why it is important to provide more than a tiny snippet of code. Had it not been for kodi's insight, we could have been guessing for ages. I had tried to figure out the problem myself but without the important information that a font other than the standard smallfont was being used, I was stumped.

Re: [Solved]HudMessage multiple strings + variable problem

PostPosted: Mon Sep 17, 2018 4:35 pm
by Collegia Titanica
I see your point.