Quote:
|
Originally Posted by Bone
what?
what do you mean
|
What I meant was that you tried to access an index of the array that is out-of-bounds.. fortunately, that is exactly what the compiler tells you!!
If you declare an array of 3 values, then you can only access the array with 3 indexes (namely: 0, 1, 2)
But what you did is create an array of 3, and then tried accessing 6 indexes (namely: 0, 1, 2, 3, 4, 5).. look here in your code:
Code:
new origin[3], checkorigin[3], validpos;
//[...]
checkorigin[0] = bankposX[i];
checkorigin[1] = bankposY[i];
checkorigin[2] = bankposZ[i];
checkorigin[3] = bankposA[i];
checkorigin[4] = bankposB[i];
checkorigin[5] = bankposC[i];
The 'checkorigin' is only an array of 3, but you are trying to access 6 indexes..
Solution: make two different arrays of 3, or make the one array an array of 6..
I hope that helps..