Standalone game hud error on bootup

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
AshHouswares
Posts: 145
Joined: Fri Jun 03, 2022 11:31 am
Graphics Processor: Not Listed

Standalone game hud error on bootup

Post by AshHouswares »

I've got this single error popping up whenever I try to boot my standalone game. I'm not sure what's wrong with it is seems to be to do with my hud zscript. Anyone here understand what this issue is?

Side note: the games title has been blurred out. It's not actually blank like that for the record.
Attachments
The zscript HUD
The zscript HUD
ERROR2.png (10.32 KiB) Viewed 396 times
The error on bootùp
The error on bootùp
ERROR.png (11.65 KiB) Viewed 396 times
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Standalone game hud error on bootup

Post by wildweasel »

You may need to put quotation marks around that; it is treating it as if it's the name of a string or variable instead.
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

Re: Standalone game hud error on bootup

Post by Blue Shadow »

Make sure you're using the latest version of GZDoom, or at least a recent one. Also, make sure you set the ZScript version at the top of your ZSCRIPT file to at least version 2.4. If you already happen to have this set to a higher version, then you don't need to change it.

Code: Select all

version "2.4" 
wildweasel wrote:You may need to put quotation marks around that; it is treating it as if it's the name of a string or variable instead.
Mono_CellLeft is a constant.
User avatar
AshHouswares
Posts: 145
Joined: Fri Jun 03, 2022 11:31 am
Graphics Processor: Not Listed

Re: Standalone game hud error on bootup

Post by AshHouswares »

Blue Shadow wrote:Make sure you're using the latest version of GZDoom, or at least a recent one. Also, make sure you set the ZScript version at the top of your ZSCRIPT file to at least version 2.4. If you already happen to have this set to a higher version, then you don't need to change it.

Code: Select all

version "2.4" 
wildweasel wrote:You may need to put quotation marks around that; it is treating it as if it's the name of a string or variable instead.
Mono_CellLeft is a constant.
My version is 3.3.0

I cant change that either. Will this be a problem because if so I need an alternative fix since upgrading is not an option. 3.3.0 should be fine though because its higher?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: Standalone game hud error on bootup

Post by Gez »

AshHouswares wrote:My version is 3.3.0

I cant change that either. Will this be a problem because if so I need an alternative fix since upgrading is not an option. 3.3.0 should be fine though because its higher?
ZScript version is not the same thing as GZDoom version.
Blue Shadow
Posts: 5046
Joined: Sun Nov 14, 2010 12:59 am

Re: Standalone game hud error on bootup

Post by Blue Shadow »

In GZDoom 3.3.0, you can either set monospacing to true (equivalent to Mono_CellLeft) or false (equivalent to Mono_Off). So change the problematic line to this:

Code: Select all

mHUDFont = HUDFont.Create(fnt, fnt.GetCharWidth("0"), true, 1, 1);
User avatar
AshHouswares
Posts: 145
Joined: Fri Jun 03, 2022 11:31 am
Graphics Processor: Not Listed

Re: Standalone game hud error on bootup

Post by AshHouswares »

Excellent, worked great thank you all very much.
Post Reply

Return to “Scripting”