title: Object reference not set to an instance of an object error?
body: <p>and in my c# program, what i am trying to do is whenever in a game you say !mypickaxe, it tells you what pickaxe you have. Recently I figured out a way to save it to a .txt file so the data could be used more than one time, but of course im getting "object reference not set to an instance of an object". Here is the part that has the error:</p>
  
  <pre><code>StreamReader streemy = new StreamReader("pickaxes.txt");
  string line = streemy.ReadLine();
  string[] thing = line.Split('=');
  player[userID].pickaxe = Convert.ToInt32(thing[1]);
  </code></pre>
  
  <p>In the .txt file, it saves like this:
      username=pickaxe
  And so it's supposed to get the number, but i get that error on this line:</p>
  
  <pre><code>string[] thing = line.Split('=');
  </code></pre>
  
  <p>Does anybody know how to fix this and/or why this happens? Thanks in advance!</p>