View Single Post
  #10  
Old 07-01-2002, 08:18 PM
GrowlZ1010 GrowlZ1010 is offline
defunct
Join Date: May 2002
Posts: 187
GrowlZ1010 is on a distinguished road
Quote:
Originally posted by Xbob42
Are there any others that can explain arrays in a simple way and showing an example of one being used. Just 1 array in a script.

I'll give it a try, lol.

An array is where one variable becomes capable of holding more than one value. In effect, it turns one variable into many.

Example.

NPC Code:

setarray test,4;

OR

test = {0,0,0,0};



... leaves you with:

NPC Code:

test[0]
test[1]
test[2]
test[3]



... which can all have different contents:

NPC Code:

test[0]=9;
test[1]=3;
test[2]=2.682475981347;
test[3]=-2;



That help?
Reply With Quote