Object reference not set to an instance of an object?

this is rather weird, it occasionaly works for one enemy and not the other. furthermore i am using the same method for my other scripts and yet this one does not work, this script is attached aswell

private Survive survive;
private Attack attack;
private Vector3 followCoordinates;
void Start ()
{
	type = false;
	attack= GetComponent<Attack>();
	survive= GetComponent<Survive>();
}
public Vector3 returnCoordinates ()
{
	if (type == true) {
		followCoordinates = attack.returnAttack ();
	}
	if (type == false) {
	followCoordinates = survive.returnWaypoint ();
	}
	return followCoordinates;	
}

how is it possible for the attack script to work and the survive not working, even though i am using the same method and both are attached to the gameObject?

If the scripts Attack and Survive and the script above are attached to the same object, this should work. You could add some debugging instructions to help finding the problem:

void Start ()
{
    type = false;
    attack= GetComponent();
    if (!attack) print("Attack not found in "+name);
    survive= GetComponent();
    if (!survive) print("Survive not found in "+name);
}

Check also if some script was not attached to a child by mistake (GetComponent will not search in the children).