| 11-16-2005, 02:01 PM | #1 |
Im curious to as what are the pros and cons to using array variables. Im thinking it would save space if I just converted all my variables to array but I remember reading using Array is risky. Also is it possible triggers just wont work due to lag? I have triggers that have been working for a long time and even though I haven't changed them they now only sometimes work. The trigger involves having a player unally a player that had just unallied them. |
| 11-16-2005, 05:07 PM | #2 |
As far as I am aware there is no risk in using a global array as oposed to a normal global. In my experience using 1 variable array for 15 settings works better than 15 individual variables; however I do not know what the actual figures are. |
| 11-16-2005, 05:09 PM | #3 |
Ok, ill convert everything to array then, Thanks |
| 11-16-2005, 06:25 PM | #4 |
Why would you convert everything to array? Do you think it would make the map faster? It is the opposite cause each array takes 8192 times the memory space of a single variable in warcraft III. Also accessing an array is slower than accessing a single variable. Arrays are not risky though, but use arrays only when you are supposed to use arrays, not everywhere |
| 11-16-2005, 07:14 PM | #5 |
... !@#$! Just spent 2 hours converting. |
| 11-16-2005, 11:01 PM | #6 |
Hahah sorry to send a mixed message. I meant its better than having TempX1 TempX2 TempX3 TempX4 to have TempX[n], not every single variable in 1 array. |
