I have this error as well. I fixed it with added a return empty string before the closing brace.
I am running osx Sierra (10.12.4 (16E195)) Xcode (Version 8.3.3 (8E3004b)).
I wasn’t sure if there was a place in build settings to tell xcode to ignore these kinds of compilation errors.
Oh BTW if anyone is using XCode there is a beta out for Xcode 9 and it actually has refactoring included so yay!
So my implementation looks like.
FString GetValidGuess()
{
EGuessStatus Status = EGuessStatus::Invalid_Status;
do {
int32 CurrentTry = BCGame.GetCurrentTry();
// Get a guess from the user
std::cout << "Your Current Try Is: " << CurrentTry << std::endl;
FString Guess = "";
std::cout << "Enter you guess: ";
getline( std::cin, Guess);
// Submit valid guess to the game
// Print Number of Bulls And Cows
Status = BCGame.CheckGuessValidity(Guess);
switch(Status)
{
case EGuessStatus::Wrong_Length:
std::cout << "Please enter a " << BCGame.GetHiddenWordLength() << " letter word.\n";
break;
case EGuessStatus::Not_Lowercase:
std::cout << "Please enter only lowercase isograms.\n";
break;
case EGuessStatus::Invalid_Characters:
std::cout << "Please only use letter no numbers or special characters.\n";
break;
case EGuessStatus::Not_Isogram:
std::cout << "Please only enter isograms.\n";
break;
default:
return Guess;
}
std::cout << std::endl;
} while(Status != EGuessStatus::OK);
return "";
}