Hey everyone! I’ve been enjoying the Unreal course a lot, but I’ve hit a snag in lecture 42. We have just written the error checking code under CheckGuessValidity and I realized I could not complete the challenge because the status isn’t changing properly. Upon debugging, I found that the value of Status isn’t OK or any other error message, but -858993460. I don’t know how it’s happening because I feel I copied the code perfectly, but I’ll post the relevant sections here.
CheckGuessValidity looks as follows:
EGuessStatus FBullCowGame::CheckGuessValidity(FString Guess) const
{
if (false)
{
return EGuessStatus::Not_Isogram;
}
else if (false)
{
return EGuessStatus::Not_LowerCase;
}
else if (false)
{
return EGuessStatus::Wrong_Length;
}
else
{
return EGuessStatus::OK;
}
}
PlayGame looks like this:
void PlayGame()
{
BCGame.Reset();
int32 MaxTries = BCGame.GetMaxTries();
for (int32 count = 1; count <= MaxTries; count++)
{
FText Guess = GetGuess();
EGuessStatus Status = BCGame.CheckGuessValidity(Guess);
FBullCowCount BullCowCount = BCGame.SubmitGuess(Guess);
std::cout << "Bulls = " << BullCowCount.Bulls;
std::cout << "Cows = " << BullCowCount.Cows << std::endl;
std::cout << std::endl;
}
}
Does anyone know why it isn’t returning the value to Status properly? Help would be appreciated!