redndahead 0 Posted January 18, 2004 I am setting an array something like DIM $Array[10] $num = 0 For $i = 1 to 2 $num = $num +1 $Array[$i] = $num Next Msgbox(0,"",$array[0]) Exit My assumption is that I should get 2 in the messagebox. I always get 0 no matter what is in my array. Am I missing something? If I check $array[1] and $array[2] they do have values to them. red Share this post Link to post Share on other sites
Valik 478 Posted January 18, 2004 You're starting your For loop at 1 so $array[1] and $array[2] are being set, but $array[0] is never set and it's defaulting to 0. Share this post Link to post Share on other sites
redndahead 0 Posted January 19, 2004 Yeah I'm a dumbass. I thought since when you used Stringsplit() the array created said the nbr of items in the array i thought all arrays did that. Duh I just set the array manually. Easy. :iamstupid: red Share this post Link to post Share on other sites