posted 14 years ago
Well, I can't say I can quite follow the logic in that last "while" loop, but that's clearly where the problems are coming in. The line
ArrayWP[i] = new Waypoint(AListWP.get(i),AListWP.get(i+1));
makes a lot of assumptions about the relationship between the size of the list and of the array and the value of "i", and what's happening is that one of those assumptions just isn't true. Try adding some "println"s to help you visualize what's happening -- for example
I'll guarantee you'll be surprised by something in the results!">