I've been going over the Gravitational Movement tutorial on RoboWiki however I may have come across an error. Im reluctant to say that it is due to the fact that I may have overlooked something. This is taken directly from the RoboWiki website.
count incriments to 2 after the check and on the next parse line 3 incurs an arrayindexoutofboundsexception:2.
Is it as simple as changing
if(count++>=getOthers())
to
if(count++>=getOthers()-1)
Not having the best understanding of turn mechanics I'm worried that there will be a trickle down effect causing issues later in the code when trying to define other enemyPoints
Thanks!
Last edit: Michael Skolarikis 2020-02-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I've been going over the Gravitational Movement tutorial on RoboWiki however I may have come across an error. Im reluctant to say that it is due to the fact that I may have overlooked something. This is taken directly from the RoboWiki website.
These are the declerations:
This is the code:
From stepping through the debugger I found that its because @:
count incriments to 2 after the check and on the next parse line 3 incurs an arrayindexoutofboundsexception:2.
Is it as simple as changing
to
Not having the best understanding of turn mechanics I'm worried that there will be a trickle down effect causing issues later in the code when trying to define other enemyPoints
Thanks!
Last edit: Michael Skolarikis 2020-02-23