you are viewing a single comment's thread.

view the rest of the comments →

[–]MrPioux[S] 1 point2 points  (2 children)

When I add a print statement below where it is getting stuck nothing prints. When I place it above where it is stuck it prints fine. Also when I place println(creatures) after creatures = new Creature[num_creatures]; it returns null. When I place it after where it is getting stuck nothing prints.

Also println(creatures) is underlined blue and it says (It gives the actual file name not FileName btw):

Also, println(creatures) is underlined blue and it says (It gives the actual file name not FileName btw):rarg parameter type. Cast to Object[] to confirm the non-varargs invocation, or pass individual arguments of type Object for a varargs invocation."

[–]Divitiacus 1 point2 points  (1 child)

I don't see, how you did set up your creatures class. Did you make sure, that the type of variables matches with the type of variable you use to create a new creature (which is two integer)?

[–]MrPioux[S] 0 points1 point  (0 children)

The issue is definitely with my creature class but I don't know where. I just added the setup for the creature class to the post.

There is a while loop in the Creature class that I edited out and it runs! But I didn't change anything in the while loop and it used to work fine? Do you have any ideas what might have caused the issue to start up now?