Variable Question: Array?

Status
Not open for further replies.
Level 7
Joined
Feb 6, 2008
Messages
133
What is array?
Is it something like this?
Instead of using lots of integer variables, i could just use array.
Example: I have 11 integer variables, 11 teleport region and 11 teleported region. so the variables is to store the random generated number for each teleport region.. but i don't have to use that much integer variables right? i could just use 1 integer variable, set array size to 10 then just index them as 0 to 10 and use this one variable for all the teleport regions.. is this correct? or is it safer to separate the variable?
 
Last edited:
Yes, arrays are generally zero based. WE doesn't enforce size limits, so you don't get array index out of bounds errors, except negative indexes.

Most functions from Blizzard.j will use 1-based indexes though, which includes most of what you see in the GUI triggers.
 
Status
Not open for further replies.
Back
Top