title: Why I can't increament in scala?
body: <pre><code>  def guessing_game():Unit = {
      println("Welcome to the guessing game!!")
  
      val guess_count:Int = 0
      val answer = Random.nextInt(50)
      var guess_num = scala.io.StdIn.readLine("Input your guess number &gt; ").toInt
  
      while(guess_num != answer || guess_count &lt; 5){
  
   ====&gt; guess_count += 1    //  &lt;==============================
  
        var situation = if(guess_num &gt; answer){"Your guess is higher!"}else{"Your guess is lower!"}
        println(situation)
        guess_num = scala.io.StdIn.readLine("Input your guess number &gt; ").toInt
      }
      if(guess_num == answer){
        println("Congratulation....You win!!")
      }else{
        println("You hav run out of guess!")
      }
  </code></pre>
  
  <p>It says:
  Error:(16, 25) value += is not a member of Int
    Expression does not convert to assignment because receiver is not assignable.
        guess_count.toInt += 1</p>