Hi,
I'm getting the error message "undefined for type main" for a function I'm trying to call from the run method of my java applet. The function definition is
public abstract class InvaderMovement
{
public static Invader getRightMostInvader(Invader[][] array, int invaderArrayWidth, int invaderArrayHeight)
{
for (int i = invaderArrayWidth - 1; i >= 0; i--)
{
for (int j = 0; j < invaderArrayHeight - 1;j++)
{
if(array[j] != null)
{
//Invader leftMostInvader = array[j];
//return leftMostInvader;
return array[j];
}
}
}
//System.out.println("Right most invader XPos is " + array[invaderArrayWidth][0]);
return null;
}
}
The line in the run method that is calling this function and is reporting the error message is
Invader rightMostInvader =
InvaderMovement.getRightMostInvader(invaderArray, InvaderArrayWidth, invaderArrayHeight);
If anyone can give me any help with this problem I would breatly appreciate it
Thanks!!
I'm getting the error message "undefined for type main" for a function I'm trying to call from the run method of my java applet. The function definition is
public abstract class InvaderMovement
{
public static Invader getRightMostInvader(Invader[][] array, int invaderArrayWidth, int invaderArrayHeight)
{
for (int i = invaderArrayWidth - 1; i >= 0; i--)
{
for (int j = 0; j < invaderArrayHeight - 1;j++)
{
if(array[j] != null)
{
//Invader leftMostInvader = array[j];
//return leftMostInvader;
return array[j];
}
}
}
//System.out.println("Right most invader XPos is " + array[invaderArrayWidth][0]);
return null;
}
}
The line in the run method that is calling this function and is reporting the error message is
Invader rightMostInvader =
InvaderMovement.getRightMostInvader(invaderArray, InvaderArrayWidth, invaderArrayHeight);
If anyone can give me any help with this problem I would breatly appreciate it
Thanks!!