Global ACS String Bug

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Jenkins
Posts: 3
Joined: Tue Mar 07, 2017 2:27 pm

Global ACS String Bug

Post by Jenkins »

Hi, so I'm trying to use global ACS in my wad which also includes map scripts. However when I use strings in the library it calls upon the first string found in the map ACS script.


Here's an edited version of my global ACS library

Code: Select all

#library "BPA.ACS"
#include zcommon.acs

Script 1024 (void) // this script executes after picking up an item
{
SetMusic("");
} 
And here's an edited version of my map ACS script

Code: Select all

Script 1 (void)
{
Print(s:"That doesn't seem to work.");
}
When I execute script 1024 from my library by picking up the item it says

Code: Select all

Music "That doesn't seem to work." not found
Has anyone encountered this before? What am I doing wrong?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Global ACS String Bug

Post by Graf Zahl »

What ACC version are you using? I rememvber that in 1.53 or 1.54 there was a bug causing pretty much what you describe here.
Jenkins
Posts: 3
Joined: Tue Mar 07, 2017 2:27 pm

Re: Global ACS String Bug

Post by Jenkins »

Graf Zahl wrote:What ACC version are you using? I rememvber that in 1.53 or 1.54 there was a bug causing pretty much what you describe here.
I'm not sure which version, it came with the version of GZDoom Builder I'm using. I'll update GZDoom Builder and test it out.

5 minutes later:

Nope, updating GZDoom Builder didn't help. I'm unaware of any direct download links to ACC, could you point me in the right direction? Thanks.
User avatar
NachtIntellect
Posts: 312
Joined: Wed Feb 29, 2012 2:10 pm
Location: Bienenstock, Germany

Re: Global ACS String Bug

Post by NachtIntellect »

Here you go, the ACC compiler is actually underneath editing: https://zdoom.org/Download
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: Global ACS String Bug

Post by cocka »

How about this one?

https://github.com/rheit/acc

I usually download it from here and then compile it with CodeBlocks. It usually works.

But anyway, here is the compiled version for Windows too:
acc.7z
(47.52 KiB) Downloaded 70 times
User avatar
Kappes Buur
 
 
Posts: 4201
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Global ACS String Bug

Post by Kappes Buur »

cocka wrote:But anyway, here is the compiled version for Windows too:
acc.7z
Why is there such a large bytes difference of acc.exe between

1.55 (Feb05-2016) 65,536 bytes from ZDoom files
1.55 (Mar12-2017) 76,800 bytes by Rachael
1.55 (Mar16-2017) 116,559 bytes by cocka
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

Re: Global ACS String Bug

Post by cocka »

I don't know I used a Win32 GCC compiler.

I think it mainly depends on the compiler.
User avatar
Rachael
Posts: 13967
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Global ACS String Bug

Post by Rachael »

I cross-compiled from Linux using mingw32.
User avatar
KeksDose
 
 
Posts: 596
Joined: Thu Jul 05, 2007 6:13 pm
Location: my laboratory
Contact:

Re: Global ACS String Bug

Post by KeksDose »

Randi used to compile acc with an old version of MSVC++, claiming it produces the smallest executable. viewtopic.php?f=4&t=45574&p=753856&hilit=acc#p753856

It even winds up being exactly 65536 bytes, go figure. Maybe there is a good reason for this as well.
User avatar
Rachael
Posts: 13967
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Global ACS String Bug

Post by Rachael »

I'm not going to load an old MSVC++ just to compile a 11k smaller ACC.
User avatar
KeksDose
 
 
Posts: 596
Joined: Thu Jul 05, 2007 6:13 pm
Location: my laboratory
Contact:

Re: Global ACS String Bug

Post by KeksDose »

Never suggested you should. :p Kappes Buur wanted to know why that build was so much smaller and I happened to remember that tidibt from the thread.
User avatar
Rachael
Posts: 13967
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Global ACS String Bug

Post by Rachael »

I didn't figure you were - but I had to get that out there before somebody suggested it.
User avatar
Kappes Buur
 
 
Posts: 4201
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada
Contact:

Re: Global ACS String Bug

Post by Kappes Buur »

Thank you for the info.
I take it then that all 3 exe files are functionally identical ?

Is there a step by step guide how to compile files from Github ?
What files to use, what envinronment to set up, etc ?
Last edited by Kappes Buur on Thu Mar 16, 2017 12:46 pm, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Global ACS String Bug

Post by Graf Zahl »

Rachael wrote:I'm not going to load an old MSVC++ just to compile a 11k smaller ACC.

That was classic Randi...
I find this kind of optimization rather pointless.
BTW, the VM serializer code for the old binary format contained an insane amount of code for shaving off single bytes here and there - that code alone was probably larger than all the savings combined it could produce. I threw that all out when transitioning to a text-based save format.
User avatar
Rachael
Posts: 13967
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Global ACS String Bug

Post by Rachael »

Kappes Buur wrote:Thank you for the info.
I take it then that all 3 exe files are functionally identical ?

Is there a step by step guide how to compile files from Github ?
What files to use, what envinronment to set up, etc ?
I compile using Windows 10's LXSS. I don't really have a step-by-step guide but any Linux system will work, even LXSS.

I don't know what dependencies it requires. If you can compile ZDoom on Linux though, you can compile at least ACC with MinGW-32.

Easiest thing to do might be this:

Code: Select all

export CC=/usr/bin/i586-mingw32msvc-gcc
export CXX=/usr/bin/i586-mingw32msvc-g++
./configure
make
zip -9 acc.zip acc.exe *.acs
cp acc.zip /mnt/c/Users/<your username>/Documents
Obviously you'll have to have mingw32 installed but it should work.
Locked

Return to “Editing (Archive)”