[Not a bug] ACS strings problems

Bugs that have been investigated and resolved somehow.

Moderator: Developers

ACS strings problems

Postby KPu3uC B Poccuu » Mon Jul 09, 2012 6:58 am

http://zandronum.com/forum/showthread.php?tid=538 -- original topic, but AFAIK, ACS problems should be discussed here. Strings of any kind don't work, they are replaced by *junk* (random string, actually defined somewhere in mod or game). So scripts produces invalid results :((

Attached file is WAD I'm working on and ONE of WADs experienced this problem.

After several tests I figured that was causing harm: base WAD for my WAD uses libraries and my scripts weren't in a library. After I added #library that was solved. But I wanna know why exactly it works so?
Attachments
punishpointer_example.pk3
(3.07 KiB) Downloaded 7 times
KPu3uC B Poccuu
 
Joined: 22 May 2011
Location: Russia

Re: ACS strings problems

Postby DavidPH » Mon Jul 09, 2012 2:04 pm

In order for multiple ACS lumps to work together, special considerations have to be made for any local-index based operation to work when those indexes are passed between code from different lumps. For strings, this means translating the local index to a global index in an implementation-defined manner. To do this, an extra instruction is added after pushing the local index to the stack.

However, and this is where your problem comes in, acc doesn't do this if you don't use #library. So it's really just a compiler limitation. Perhaps acc should have a switch to make it always tag strings?
DavidPH
<shamelessplug>
 
Joined: 28 Aug 2009


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest