title: CS0019 Operator '+=' cannot be applied to operands of type 'int' and 'bool'
body: <p>I'm currently working coding a simple dice game and I have run into a error which has left me confused, Here is my code.</p>
  
  <pre><code>foreach (var die in Dice.rolls)
  {
      Console.WriteLine(die.ToString());
  }
  if (player.score += score &gt;= goal)
  {
      playing = false;
      Console.WriteLine("{0} has won the game!", player.name);
      Console.WriteLine("Please press any key to end the game");
      Console.ReadKey();
  }
  else
  {
      player.score += score;
  }
  </code></pre>
  
  <p>The problem I am having is that the line:</p>
  
  <pre><code>if (player.score += score &gt;= goal)
  </code></pre>
  
  <p>Is throwing up an error telling me I can't use it on int's and bool's but all the variables in the if statement are int's. furthermore a few lines down here:</p>
  
  <pre><code>player.score += score;
  </code></pre>
  
  <p>Is not giving me any errors.</p>