I have multiple animations for a knight.
I have and elsewhere in the code.
I have an error that shows up at random points in the game.
"Caused by: java.io.FileNotFoundException: Could not find file: ka5.png"
The problem with this is that the game shouldn't even be searching for a ka5.png file. In line 5 of the code, it is basically saying to alternate between images ka1.png - ka4.png, but the program is searching for a 5th image.
It is super annoying, and no one I have asked has seemed to know what the problem is.
Does that make sense?
private int imageNumber = 1;
private int count;
public void switchPicone()
{
if (count % 10 == 1)
imageNumber++;
if (imageNumber == 4)
{
imageNumber = 1;
}
setImage("ka" + imageNumber + ".png");
count++;
}

