- Home /
 
 
               Question by 
               edragongaming · Mar 11, 2014 at 08:36 PM · 
                errorintboolif statementand  
              
 
              I am having questions having an and statement within an if statement and the error is saying that i cannot convert an int to a bool
 if (player.Lives = 0 && player.Score == player.High) 
     { 
         Application.LoadLevel (2);
     }
     else if (player.Lives = 0 && player.Score > player.High) 
     {
         player.High = player.Score;
         Application.LoadLevel(3);
     }
 
              
               Comment
              
 
               
              Answer by robertbu · Mar 11, 2014 at 08:39 PM
On line 5, use '==' instead of '='.
Thanks I feel kinda like a noob for not realizing my mistake sooner than that b but the code works now which i feel proud about
Your answer
 
             Follow this Question
Related Questions
BCE0022: Cannot convert 'String' to 'int'. 0 Answers
How do I change a clicked on GameObjects variable when a boolean (Next Turn) is true? 1 Answer
Cannot convert method group 'xxxxxxxxxxx' to non-delegate type bool. 1 Answer
I'm having trouble setting a bool. 2 Answers
Problem with updating an integer. 1 Answer