Quick Question

TheOverWhelm

Member
Reaction score
16
Why is it that when I have 9 arrays of a size 2000 that the map stops working?

They're titled as GGG_wqersdfxcvsd kind of things
I have a GGG_Unit
GGG_UnitMovingDirection etc, and when I had them all in a map at a time it stops working.
Is there a reason for this?
Edit: Not JASS variables, but used in JASS.
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
Are you sure it is the cause of the arrays, and not just something in the trigger using the array?

Might wanna post your triggers.
 

jig7c

Stop reading me...-statement
Reaction score
123
are you loading the map with 2000 units, and telling the computer memory to store each of the unit's positions, moving direction, etc... at once?
 

TheOverWhelm

Member
Reaction score
16
I literally had ONE trigger and that was a periodic 1 that sent a message along the lines of "adf"
Nothing in the map script either
No units placed
I exported the triggers to an empty map and cleared it all, btw
I deleted random variables, such as EVERY single one except the GGG_ ones then tested, no message.
I deleted ONE of the GGG_ arrays and it worked
I then 'returned' that one (ctrl+z) and tested it then, didn't work
I then removed a nonarray GGG_ and it still didn't work.

Would someone else test this as well? To make sure it isn't my WE doing odd things
Use JASSNewGen btw
 

death_knight

Dark is the heart of a corrupted man.
Reaction score
24
if you are trying to load 2000 units, then i think i know your problem.

The maximum number of units on the map at one time is something like 1800 units, so if you try to load 2000, the map can't handle it and shuts down.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Why is it that when I have 9 arrays of a size 2000 that the map stops working?
There is a maximum number of JASS operations that WC3 allows itself to execute all in a row. Creating an array of size 2000 translates into JASS code that causes WC3 to initialize the value of all 2000 indices in a row upon map loading, and all global variables are initialized together. Initializing that many variables (~8000 or more) is enough to cause WC3 to terminate all operations happening at that time, which means that it never gets around to loading the map's triggers.

This, as you've found out, is a great way to completely disable a map. :p

In general, you shouldn't even be setting your array size to be more than 1, because an array is always full-sized (0 through 8191). The only difference made by setting an array's size in the editor is how many values will be given an initial value, which is typically unnecessary (sometimes necessary for unit groups, if you want to add units to a group without first setting a value to the variable).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top