SetActorLabel problem

Hello guys,

i have some trouble in replacing the actor’s name. I tried to do this:
RandomActor ->SetActorLabel(FString(“ThisIsActor%d”,i));

I want to name this: ThisIsActor444 (i = 444) but it doesnt work… Instead, it ruins up the name (eg “ThisIsAc”)

Any ideas??

FString does not have the ability to directly append variables like you’re code is trying to do.
The “i” in your case would be interpreted as “extraSlack” property to the FString.

You could use FString::Printf however, like so:

FString::Printf(TEXT("ThisIsActor%d"), i)

This worked! Thank you!! Also, this is working:

SetActorLabel(Fstring("TheActor") + Fstring::FromInt(i));