Standalone game hud error on bootup

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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!)

Standalone game hud error on bootup

Postby AshHouswares » Mon Jun 20, 2022 9:34 am

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.
You do not have the required permissions to view the files attached to this post.
User avatar
AshHouswares
Online Requirements can Go To Hell
 
Joined: 03 Jun 2022
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed

Re: Standalone game hud error on bootup

Postby wildweasel » Mon Jun 20, 2022 10:01 am

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.
User avatar
wildweasel
from a different perspective.
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: Standalone game hud error on bootup

Postby Blue Shadow » Mon Jun 20, 2022 3:13 pm

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 allExpand view
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
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Standalone game hud error on bootup

Postby AshHouswares » Mon Jun 20, 2022 4:31 pm

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 allExpand view
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?
User avatar
AshHouswares
Online Requirements can Go To Hell
 
Joined: 03 Jun 2022
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed

Re: Standalone game hud error on bootup

Postby Gez » Mon Jun 20, 2022 4:37 pm

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.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Standalone game hud error on bootup

Postby Blue Shadow » Mon Jun 20, 2022 5:49 pm

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 allExpand view
mHUDFont = HUDFont.Create(fnt, fnt.GetCharWidth("0"), true, 1, 1);
User avatar
Blue Shadow
 
Joined: 14 Nov 2010
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD (Modern GZDoom)

Re: Standalone game hud error on bootup

Postby AshHouswares » Tue Jun 28, 2022 7:12 pm

Excellent, worked great thank you all very much.
User avatar
AshHouswares
Online Requirements can Go To Hell
 
Joined: 03 Jun 2022
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed


Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests