[Solved]HudMessage multiple strings + variable problem

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

[Solved]HudMessage multiple strings + variable problem

Postby Collegia Titanica » Sun Sep 16, 2018 12:49 pm

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);
Last edited by Collegia Titanica on Sun Sep 16, 2018 8:48 pm, edited 1 time in total.
Collegia Titanica
 
Joined: 25 Jan 2018
Discord: 2834

Re: HudMessage multiple strings + variable problem

Postby kodi » Sun Sep 16, 2018 3:05 pm

You're not using INDEXFONT as your font right? Or some other custom one that only has numbers.
User avatar
kodi
Proscrastinator
 
 
 
Joined: 06 May 2013

Re: HudMessage multiple strings + variable problem

Postby Collegia Titanica » Sun Sep 16, 2018 8:47 pm

Holy shit! That was the problem ! Only numbers in the current font.I never would have guessed, thanks
Collegia Titanica
 
Joined: 25 Jan 2018
Discord: 2834

Re: [Solved]HudMessage multiple strings + variable problem

Postby Enjay » Mon Sep 17, 2018 1:30 am

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.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [Solved]HudMessage multiple strings + variable problem

Postby Collegia Titanica » Mon Sep 17, 2018 4:35 pm

I see your point.
Collegia Titanica
 
Joined: 25 Jan 2018
Discord: 2834


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest