Failed to parse argument

Recently I noticed the following lines in the output log window of the UE4.12 editor:

LogText:Warning: Failed to parse argument "GameModeName" as a number (using "0" as a fallback). Please check your format string for errors: "GameMode: Edit {GameModeName}".
LogText:Warning: Failed to parse argument "RootClass" as a number (using "0" as a fallback). Please check your format string for errors: "Select {RootClass} Class".
LogText:Warning: Failed to parse argument "GameStateName" as a number (using "0" as a fallback). Please check your format string for errors: "GameState: {GameStateName}".
...

Any ideas what these warnings could mean?

I get this whenever I try to use the “Open Blueprint Class” menu-item in the Blueprints menu dropdown, which force closes itself the moment my mouse hovers over it. Luckily I can still open blueprints through the content browser.

I get this issue too.

My Format call

ReturnData.ItemNameAsText = FText::Format(FText::FromString(“{MatName} {ItemName}”), MaterialName, InvInterface->GetNameAsText());

The Warning I get

LogText:Warning: Failed to parse argument “MatName” as a number (using “0” as a fallback). Please check your format string for errors: “{MatName} {ItemName}”

LogText:Warning: Failed to parse argument “ItemName” as a number (using “1” as a fallback). Please check your format string for errors: “{MatName} {ItemName}”.

what I’m plugging into MatNAme and ItemName are already FText, so it’s incorrectly converting them to a number and causing the warning, but it displays the text correctly nevertheless.

No ideas? :frowning:

No idea. Happens to me, too.

Same here (sorry for the great informative input you were expecting…)
Project was converted from a previous UE4 version

100% BUG, why is not in BUG section?

I get these log lines as well every time I open the Blueprints menu dropdown.
When I debugged it I found that it happens when the menu items concerning the GameMode are created.

It uses FText::Format() with e.g. the format string “GameMode: Edit {GameModeName}” but seems to expect a numeric parameter like “{0}” instead of the “{GameModeName}” named parameter. However, after printing the formatting warning, it then uses a numeric parameter as fallback and thus it still works.

I took a look at the 4.13 source and here it is replaced with e.g. “GameMode: Edit {0}”. So it seems to be fixed in 4.13. :slight_smile:

Thanks for letting us know. Coming from blueprint perspective, I was following the Text format k2 blueprint node which allows anything to be placed inside the { } brackets, but after removing the text and putting numerical [0], [1] in my code implementation of format, the warning stopped.