Issue with FText::FromStringTable after updating from Unreal 5.4.4 to Unreal 5.5.1

Hi!

In the project I’m working on, I do use a set of string tables stored in csv files. To retrieve a specific string, I’ve been using FromStringTable, as in the following code (UpdateMessage is a function I’ve defined):

myHUD->UpdateMessage(FText::FromStringTable("UIStrings", "Messages.Beast.Freed"));

So far, this has worked without any issue. However, after updating to 5.5.1, I get this compile error for every instance where I use that syntax:

error C2664: 'FText FText::FromStringTable(const FName,const FTextKey &,const EStringTableLoadingPolicy)': cannot convert argument 2 from 'const char [21]' to 'const FTextKey &'
note: Reason: cannot convert from 'const char [21]' to 'const FTextKey'
note: 'FTextKey::FTextKey': no overloaded function could convert all the argument types

Evidently the definition for FromStringTable has been updated; can anybody help me? What’s the best way to update my code in this regard?

Thanks in advance!

Hi

As the message error says, simple pass a reference instead of a char, in other words:

FTextKey InKey = "Messages.Beast.Freed";
FText text = FText::FromStringTable("UIString", InKey);
myHUD->UpdateMessage(Text);

Or simple

FTextKey InKey = "Messages.Beast.Freed";
myHUD->UpdateMessage(FText::FromStringTable("UIString", InKey));

Bye :rocket:

Thank you!

This definitely put me in the right direction. FTextKey tho requires a string to be initialized; hence the right syntax is:

FTextKey InKey = FString(TEXT("Messages.Beast.Freed"));
FText text = FText::FromStringTable("UIString", InKey);
myHUD->UpdateMessage(Text);

Cheers!