Ok got it !!
if (num > players.length)
{
incSize(num);
Was also killing me. It obviously wasn't doing its job correctly.... well it was, my attempt at coding was...
Type: Posts; User: taz_1891
Ok got it !!
if (num > players.length)
{
incSize(num);
Was also killing me. It obviously wasn't doing its job correctly.... well it was, my attempt at coding was...
Ok, so num in the for loop should actually be players.length (the size of the array). But i feel it will still start from the beginning and write over everything every time i 'add' a player.
So...
Sorry.
The problem is when i add a player (addCenter or addGuard), it suppose to store the information the user inputs into an array. Then at the menu, when they select option 3 (Show players...
Ah ok (i think i understand).
So will that is definitely one issue (thanks) but it wouldn't relate to the array problem would it. The fact that everything gets written over when a new entry is...
Even if its getting those parameters from the other two classes?
I have two other classes (positionCenter and positionGuard) which stores that info.
P.S Sorry about the original effort. As soon...
Hi all,
Im having huge problems trying to get a toString method in one class to print everything in the array in another class. It will be ok if i just add a guard or a center, but as soon as i add...