Another way to add integers into strings

Here’s an example for another way to insert an integer variable into your string. I’m not sure what the difference is between this method and the one in the lecture, but I thought it’s worth mentioning

void UBullCowCartridge::PrintAvailableLives(int32 _Lives)
{
    UBullCowCartridge::PrintLine(TEXT("You have " + FString::FromInt(_Lives) + " lives"));
}
1 Like

Wrong forum. Make sure you post it in the Unreal section to get the best response. Thank you for posting it!

Privacy & Terms