Object reference not set to an instance of an object. Do I need a constructor?
<p>OOP beginner here and my problem  is when i get to this event :</p>

<pre><code>    private void button1_Click(object sender, EventArgs e)
    {
        progressBar2.Increment(-25);
        splitContainer1.Panel1.Enabled = false;
        Thread.Sleep(2100);
        int preAttack = myCurrentOpponent.SetAttack();
        oppAttack = myCurrentOpponent.Attack(preAttack);
        progressBar1.Increment(oppAttack.dommage);
        textBox1.Text += myCurrentOpponent.Name + "Used " + oppAttack.AttackName;

    }
</code></pre>

<p>I get an error : Object reference not set to an instance of an object.
Things you need to know <em>myCurrentOpponent</em> is an object chosen randomly in a collection of 3 monsters type. I'll use <em>Gollum</em> for this example wich is one of the 3 types. Gollum inherit from Monster and overrides <em>Name</em>, <em>Level</em>, <em>Health</em>, <em>PreAttack</em> and <em>SetAttack</em> from is base.</p>

<pre><code>    public abstract class Monster
{
    public abstract string Name { get; }
    public abstract int Lv { get; }
    public abstract int Hp { get; }

    public abstract int SetAttack();
    public abstract Attack Attack(int x);


    public Monster()
    {
    }
}
</code></pre>

<p>Nothing in here is set because of this :</p>

<pre><code>    public class Gollum : Monster
{
    Attack[] myAttack = new Attack[4];

    public override string Name
    {
        get
        {
            return "Gollum";
        }

    }

    public override int Hp
    {
        get
        {
            return 100;
        }
    }
    public override int Lv
    {
        get
        {
            return 3;
        }
    }

    public override int SetAttack()
    {

        Random randnum = new Random();


        int x = randnum.Next(5);

        myAttack[0].AttackName = "Charge";
        myAttack[0].dommage = -10;
        myAttack[1].AttackName = "Scratch";
        myAttack[1].dommage = -12;
        myAttack[2].AttackName = "Throw Rock";
        myAttack[2].dommage = -15;
        myAttack[3].AttackName = "Strangle";
        myAttack[3].dommage = -16;
        return x;
    }
    public override Attack Attack(int x)
    {
        return myAttack[x];
    }

    public Gollum()
    {
    }
</code></pre>

<p>Everything is set in the 3 monster sub-classes. Now, let's say the chosen monster is Gollum and I click button 1, as soon as the compiler reaches this line...</p>

<pre><code>     myAttack[0].AttackName = "Charge";
</code></pre>

<p>... called from this line...</p>

<pre><code>    int preAttack = myCurrentOpponent.SetAttack();
</code></pre>

<p>...I get the error.
Am i missing a constructor for my <em>Gollum Class</em> ? And if I am how can i code it
since everything is set directly in the property.
I really hope someone can help me on this on because I really don't know where to look.
Hope this is clear enough and don't hesitate to ask if you need more code lines.
Thanks in advance</p>
