Formatting Strings With Printf

In this lesson, we cover how to format strings using Printf.

If you have any questions regarding this lecture, then post away below!

Make sure to take time to process that final slide…it’ll be great to hear how you get on with writing that line of code!

1 Like

Tried using two instances of %i and had to add another “HiddenWord.Len()”.

    PrintLine(FString::Printf(TEXT("The %i letter word has %i letters, dumbass!"), HiddenWord.Len(), HiddenWord.Len()));

I have a question: since this section is not done yet and will take some time until it is, should I move on to section 7: Building Escape or could this cause any issues for me (that I don’t understand parts of it for example)? Btw , love the course!

It’s a lot but seems simple enough.

1 Like

Here is my code. I’m following along in Visual Studio 2019

Thanks for the quick response

1 Like

My Bulls and Cows code :

I’m in this section, when compiling everything is great. When play the game I have a crash. It’s right after I added the %s with the *hiddenword to the fstring line in the beginplay function

Exactly like in the video says. Compiling is done and green… but when I press play crashes and the log is thisIMG_20190918_142020

Hope I can get help asap so I can follow the course.

Privacy & Terms