Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Mordeth

[not really a bug] ACS and arrays

Recommended Posts

I usually use arrays to generalize scripts. An index number is passed to the script to pick the right row and/or column. These arrays are up to now with either global or map scope.

The following (bare minimum example) script works:

str 	doors[4] = { "MDOORG", "GDOORG", "HANGARG", "HANGRGG" };

script 105 ( int nTag, int nType, int nOpen ) {
    print(s:"boo" );
}
However, the following crashes Eternity:
script 105 ( int nTag, int nType, int nOpen ) {
    str 	doors[4] = { "MDOORG", "GDOORG", "HANGARG", "HANGRGG" };

    print(s:"boo" );
}

Share this post


Link to post

master:
I get error "Incorrect code count. 80/78/292" in debug config, and it calls I_Error from https://github.com/team-eternity/eternity/blob/master/source/acs_acs0.cpp#L954-L958. I cannot replicate an actual crash in release config, as it just DSTINKs and spits out an error when the script is executed: "ACS ERROR: KILL 365-1 AT 11 FROM VM 0".

ACSVM:
Works fine, prints "boo".

Note:
According to DavidPH "local arrays are not implemented on master."

Link to the wad I used to test, use puke 4 to execute the script: http://s000.tinyupload.com/?file_id=22385107839408044663

Share this post


Link to post
Altazimuth said:

Note:
According to DavidPH "local arrays are not implemented on master


Suspected as such, hence my hesitation to call this a bug outright. Will just have patience until acsvm :)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×