Basic Array Question

For z = 0 To DiceArray2.LastIndex
DiceArray1.Add(DiceArray2(i))
Next

I’ve already declared Var z as integer and Var DiceArray1() and DiceArray2() as Integer… my code works great up to the part where I want the values in DiceArray1 to be the same as values in DiceArray2.

I have debugged the program and saw DiceArray2 has the correct values. When it copies though, DiceArray1 fills with zeroes. (I don’t want to use code “DiceArray1 = DiceArray2” because later in the program I manipulate DiceArray2 and they stay connected.)

What am I missing? Thanks in advance!

You’re using different indexes (z and i). Typo here?

1 Like

whistles innocently… Embarrassed. Thank you… :expressionless: :roll_eyes:

2 Likes
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.