Script Err: Too Many Map Variables

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Sir_Alien
Posts: 80
Joined: Tue Sep 13, 2005 8:23
Location: Sydney, Australia
Contact:

Script Err: Too Many Map Variables

Post 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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post 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.
User avatar
Sir_Alien
Posts: 80
Joined: Tue Sep 13, 2005 8:23
Location: Sydney, Australia
Contact:

Post 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.
User avatar
solarsnowfall
Persecution Complex
Posts: 363
Joined: Fri Aug 05, 2005 8:51

Post 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?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Yes. One array counts as one variable.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Can't you extend it just a little more, say, 1024?
User avatar
solarsnowfall
Persecution Complex
Posts: 363
Joined: Fri Aug 05, 2005 8:51

Post 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?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Nash wrote:Can't you extend it just a little more, say, 1024?

No.
User avatar
chopkinsca
Posts: 183
Joined: Thu Dec 29, 2005 8:09

Post 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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Check ACC's compile stats.
Locked

Return to “GZDoom”