Code:
if(CheckValidInput(intTemp)==true)
{
intNumberofTries++;
numTriesLabel.Text=intNumberofTries.ToString();
if((intNumberofTries>8)||(blnSuccess==true))
{
blnStartFlag=false;
messageLabel.Text="The Game has already ended.\nClick the Start button for another game";
}
else
{
intStatus = CompareWithNumber(intTemp);
if(intStatus==0)
{
messageLabel.Text="Congratulation! It's Correct";
blnSuccess=true;
}
else if(intStatus==-1)
messageLabel.Text="Too Low!!!";
else
messageLabel.Text="Too Hard!!!";
}
}
Been trying to fix that purple part for ages. VS says: Operators "==" cannot be applied to operands of type 'object' and 'bool'.
Any idea what I can do to fix it?