Unexpected symbol `void' in class, struct

void Client_RemovePlayer(NetworkPlayer view)
{
MPPLayer temppl = null;
foreach(MPPLayer pl in PlayerList)
{
temppl = pl;
}
}
if( temppl != null)
{
PlayerList.Remove(temppl);

}

public class MPPLayer

{
public string PlayerName = "";
public NetworkPlayer PlayerNetwork;

Is it because your if statement is outside of a function definition? or are you defining the function inside another function? can’t really tell from what you posted, could be a couple different things. Perhaps post some more for us to see where you went wrong?