Java help

Soldato
Joined
28 Oct 2006
Posts
12,457
Location
Sufferlandria
i have this code
Code:
int marker = 0;
for(int x = 0; x < arraylength; x++)
{
	if(name==players[x].getPlayerName() && surname == players[x].getPlayerSurname())
{
	marker = x;
}
}
this is how i set up my array:
Player[] players = new Player[arraylength];
but im getting a null pointer error when i run it :(
Anybody have any ideas?
 
Back
Top Bottom