Trying to find out why this doesn’t work? …
void USelectionSubsystem::PrintCurrentStart()
{
FString startactorname = StartActor->GetName();
GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Red, FString::Printf(TEXT(“%s”), startactorname));
}
Trying to find out why this doesn’t work? …
void USelectionSubsystem::PrintCurrentStart()
{
FString startactorname = StartActor->GetName();
GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Red, FString::Printf(TEXT(“%s”), startactorname));
}
Replace
GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Red, FString::Printf(TEXT("%s"), startactorname));
with
GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Red, FString::Printf(TEXT("%s"), *startactorname));
FString::Printf doesn’t take fstring as a parameter directly. You need to dereference it.