PDA

View Full Version : checking arrays.


joseyisleet
07-19-2002, 03:59 PM
Aloha, how would i check if a array is at it's max like if i specify the max of it and it reaches that and it does something how would i do it, and how would i show it in showimg?, thanks anyone who can help.
- Chicken AKA Howard

GrowlZ1010
07-19-2002, 04:51 PM
To find out the size (what I presume you mean by 'maximum') of an array, use the arraylen(var) function. This will return the number of individual slots inside the array itself. So to do something when a variable reaches the length of your array:


if (yourvariable=arraylen(yourarray)){
// do stuff
}

joseyisleet
07-19-2002, 04:57 PM
Thanks :) i appreciate that alot :), how would i show an array in a message or some if possible.
-Chicken AKA Howard

screen_name
07-19-2002, 08:27 PM
well, you could use a loop


for (this.i=0;this.i<arraylen(myarray);this.i++) {
showimg this.i+1000,@#v(myarray[this.i]),5,80+(this.i*10);
changeimgzoom this.i+1000,.7;
changeimgvix this.i+1000,4;
}

joseyisleet
07-20-2002, 08:10 AM
ok kool thanks :), i got it now :).