- Joined
- Feb 24, 2007
- Messages
- 1,098
What? Oh.. Hold on..
That?
What does that change?
That?
What does that change?
the question wasn't "What do arrays do?" it was "What does the array size change?"
Question:Question:What does the size of the array mean?Answer:Answer:If you access a part of an array that you have not stored anything in yet, then Warcraft may crash or people may disconnect. If you set a size for your array, then the first entries in the array will be created and initialized for you. You can still add entries beyond the original size, but make sure you assign them before you access them.
Warcraft will actually allocate space for one more entry than you ask for. For example if set an array's size to 3, then entries 0, 1, 2, 3 will all be created. This is so you can start using the array at either 0 or 1 and still have 3 entries.