StrParam breaks script table handling in global ACS

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.
Post Reply
User avatar
Nightfall
Posts: 555
Joined: Thu Aug 06, 2009 4:00 am
Location: Finland

StrParam breaks script table handling in global ACS

Post by Nightfall »

http://zandronum.com/tracker/view.php?id=1307
http://zandronum.com/tracker/file_downl ... 3&type=bug
Ijon Tichy wrote: This is a weird bug. When StrParam doesn't come into play, ACS libraries have their own string table, and things work fine. However, when StrParam is used and a map with ACS is opened, ACS libraries suddenly decide that using their own string table makes too much sense, and instead, they use the string table that the BEHAVIOR lump is using. This fails miserably. Every single string in the library changes values, and this ends up leading to a crash with libraries such as stralloc.h (to be attached).

1. Load Zandronum with strparambroken.pk3.
2. "map map01"
3. Hit the switches on the metal textures. The strings for these are provided by BEHAVIOR, and StrParam works as expected. (Should print "StrParam BEHAVIOR" and "Static BEHAVIOR")
4. Hit the switches on the stone textures. The strings for theses are provided by LOADACS... or would be if it didn't break. They print the exact same things the metal switches do (instead of "StrParam LOADACS" and "Static LOADACS").
User avatar
The Zombie Killer
Posts: 1528
Joined: Thu Jul 14, 2011 12:06 am
Location: Gold Coast, Queensland, Australia

Re: StrParam breaks script table handling in global ACS

Post by The Zombie Killer »

Strange, this may be the reason some of my mods' string-related features have been breaking in Zandronum 2.0 (I would like to note that they do not break in Zan 3.0 or the latest versions of ZDoom/GZDoom, so it may be an unrelated bug causing that)

Edit: Looking at the bug report, adding a #library definition fixes it, which is exactly what fixed those issues for me in Zan 2.0, so maybe it's the same bug. In that case, I don't think this is present in current versions of ZDoom.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: StrParam breaks script table handling in global ACS

Post by Graf Zahl »

A missing #library statement is a user error. A library without this will inevitably have problems with string references.
And that's exactly what's missing in the linked code.
User avatar
Nightfall
Posts: 555
Joined: Thu Aug 06, 2009 4:00 am
Location: Finland

Re: StrParam breaks script table handling in global ACS

Post by Nightfall »

Thanks, I missed that when I went through the example wad.
Post Reply

Return to “Closed Bugs [GZDoom]”