Page 1 of 1

Script Err: Too Many Map Variables

Posted: Sat Jul 22, 2006 7:11
by Sir_Alien
Using ACC 1.42...
script.acs:1269: Too many map variables.
> str
> ^
script.acs:1298: Too many map variables.
> str
> ^
You have got to be joking..? :?

[EDIT] Sorry, I realised I should have probably made a point with this post, but I was in a state of disbelief when I first posted...

In essence, I have for the moment rectified the problem, however I will no doubt hit this limit again shortly and the next time it happens I won't be able to do anything about it.
  • 1) Why does this limit exist?
    2) What is the limit (forgive me for not wanting to go through and count how many variables I'm using... :P )?
    3) Can this limit please be removed?
    4) If the limit is genuinely necessary, can it be extended please?
Cheers.

Posted: Sat Jul 22, 2006 8:42
by Graf Zahl
1) Because ACS was designed for Hexen and Raven made a limit that was sufficient for their needs.
2) Originally it was 32 but it has been bumped to 128
3) It can be extended but not removed.
4) If you need that many variables consider using arrays.

Bottom line: If you run into such a limit you are clearly doing something wrong and your code is in need of redesign.

Posted: Sat Jul 22, 2006 9:35
by Sir_Alien
Graf Zahl wrote:Bottom line: If you run into such a limit you are clearly doing something wrong and your code is in need of redesign.
I fully understand and have expected that reaction, but please understand I would not be broaching this subject if it were not absolutely necessary. Before even knowing this limit existed I still made every effort to keep the number of variables I use to an absolute minimum (indeed, through a arrays and also #defines), hence my conceit at the fact I had reached it.

Thank you for answering my questions, and I will take your advice on board.

Posted: Sat Jul 22, 2006 21:14
by solarsnowfall
I'm working on a script set that uses a 3-d array, with 875 ([35][5][5]) individual values. Does this only count as one var in ZDoom? Also, this could easily expand and become quite a bit bigger, am I going to hit the ceiling anytime soon as far as the amount of values that can be stored in an array?

Posted: Sat Jul 22, 2006 21:33
by Graf Zahl
Yes. One array counts as one variable.

Posted: Sat Jul 22, 2006 21:37
by Nash
Can't you extend it just a little more, say, 1024?

Posted: Sat Jul 22, 2006 21:57
by solarsnowfall
So I could have 128 arrays of just about any size configuration? Is there a max size, or max number of values that can be stored in a map level array?

Posted: Sat Jul 22, 2006 22:28
by Graf Zahl
Nash wrote:Can't you extend it just a little more, say, 1024?

No.

Posted: Sat Jul 22, 2006 22:53
by chopkinsca
Is there an easy way to find out how many variables are used? I suppose I could go through the scripts and count them myself, but maybe there's a console command that does the same thing.

Posted: Sat Jul 22, 2006 22:54
by Graf Zahl
Check ACC's compile stats.