warning CS0649: Field is never assigned to, and will always have its default value `null'

In short, I’m making a simple 2D space shooter game. For the ship, I have a basic ammo counter. It doesn’t have anything complex on it yet. Just the code stating how much ammo the player has. However, I get the warning mentioned above and I cant find out why.

    //Reference to the text mesh for the Ammo count. 
    public TextMesh ammoTextMesh; 
    //Contains a copy of the original text to be later 
    //modified for a dynamic value. 
    private string AmmoText; 

    // Use this for initialization
    void Start () {

    updateAmmo (10); 
    }

    public void updateAmmo (int value) {

    ammoTextMesh.text = AmmoText;
    ammoTextMesh.text += value; 
    }

This is all there is to it right now, and it mimics the exact same code I have for player health, yet the health isnt throwing a code. I do also have an ammo text gameObject, which I ensured MANY times was attached to the HUD script being used above.

The error means what it says. AmmoText is private and never initialized to any value. You are then trying to use ‘AmmoText’.

For future posts, please include a copy of your error message from the console and the complete script. These allow us to immediately find the line generating the error and see the stack trace.