redndahead Posted January 18, 2004 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
Valik Posted January 18, 2004 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.
redndahead Posted January 19, 2004 Author 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now