title: Unity c# Cannot return a value from iterators. Use the yield return statement to return a value, or yield break to end the iteration
body: <p>Hello i got this error wen i updated unity 
  Assets/TCG/Scripts/card.cs(1232,71): error CS1622: Cannot return a value from iterators. Use the yield return statement to return a value, or yield break to end the iteration</p>
  
  <p>I looked at the code a bunch of times played around with it and i cant fix it i looked for a fixes but there non i can understant that good so can someone help me heres the code if you need the hole code tell me i will add it this is the part that the error shows .</p>
  
  <pre><code>IEnumerator PayAdditionalCostAndPlay()
  {
      if (DiscardCost &gt; 0 &amp;&amp; ValidSpell())
      {
          Player.ActionCancelled = false;
          Player.targets.Clear();
          Debug.Log("this card has an additional discard cost");
  
          for (int i = 0; i &lt; DiscardCost; i++)
          {
              Player.NeedTarget = 21; // a card in hand to discard
  
              while (Player.NeedTarget &gt; 0)
              {
                  yield return new WaitForSeconds(0.1f);
              }
              if (Player.ActionCancelled) 
              { 
                  Debug.Log("action cancelled"); 
                  return false; 
              }
          }
  
          foreach (GameObject target in Player.targets) //discard
          {
              target.GetComponent&lt;card&gt;().Discard();
          }
      }
  }
  </code></pre>