[4.10.0] ACS HudMessage issue

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
Alfred Don
Posts: 45
Joined: Mon Aug 01, 2022 11:52 am

[4.10.0] ACS HudMessage issue

Post by Alfred Don »

I have two scripts in my mod that seem to be having trouble with eachother. The first script, simply gets the value from a CVAR.

Code: Select all

#library "torcvar"
#include "zcommon.acs"

script "lowgraphicsmode" (void)
{
    SetResultValue(GetCVar("bd_lowgraphicsmode"));
}
The next one displays a hudmessage on screen.

Code: Select all

#include "zcommon.acs"
script "toast" (void)
{
       HudMessageBold(s:"Press ", k:"+use", s:" to interact with this object.";
		HUDMSG_PLAIN, 9090, CR_GREEN, 0.5, 0.8, 1.0);
}
If I have the first script loaded, for some reason when I run the second script, I get garbage on screen, instead of the text.
Image
However, if I don't load the first script, the message displays fine
Image
This seems to happen with other scripts too, if I have a different script loaded, it will display random information from that one.

Additionally, if I move toast before torcvar in the loadacs file, it works perfectly fine.
User avatar
phantombeta
Posts: 2129
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: [4.10.0] ACS HudMessage issue

Post by phantombeta »

Each ACS library loaded with LOADACS need an unique #library directive of its own. "torcvar" has one but not "toast". (I recommend giving it the same name as the ACS file)
When an ACS library is missing the library directive, its string table will behave unpredictably and things like this will happen.

Return to “Closed Bugs [GZDoom]”