variable array - when to set the size high?

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
Hello I was wondering what Exactly the size does?

I know from epxeriance that sometimes it doesn't work when you are using a array index higher than what you have set it to, but aprt from that alot of other variables doesn't need to have the size higher than 1.

What exactly demand an higher array size?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
The size of the array determines how many elements of the array will be initialized.

For an integer for example this does absolutely nothing. Since Integers are so simple object instances they do not need to be "initialized", when created they are 0 by default.

Where it is useful to set the array size is for more complex elements such as unit groups. Since you cannot add any units to a unit group which is not initialized. But in most cases you initialize Unit-Groups yourself when creating them.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
do hashtables need to be initialized to store any of those forms of data that need it for variables?
 

Jedi

New Member
Reaction score
63
No array size doesn't matter and you have to create a hashtable with "hashtable - create hashtable".I am talking about above post.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i knew that, i have just never heard of initializing variables, but i use hashtables in lue of variables anyway
 
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