Tries Keep Incrementing

I need some help and I can’t figure out what I’m doing wrong.

I think it has to do with my FBullCount FBullCowGame::SubmitGuess(Fstring Guess) function.

No matter what even if its wrong it keeps incrementing up. Did I miss something? I never saw in the lecture how this was dealt with.

It always will when it goes into that function. The only time it will go into that function is when the user inputs a valid word which is partly covered in the switch statements lecture. Later on you’ll add the code to check the current try with the max tries so the game will end and also stop it if they win the game. If your having the issue of it not resetting after asking the user if they want to play again then you missed resetting it in the games reset function.

Thanks for the response. I figured out what I was doing wrong. I forgot to Set status within it. This was causing it to disregard the switch cases completely.

Privacy & Terms