Why does StringToInt always return 0?

I’m trying to make a system that will hash any fstring into a unique int value. To test it, I just ran StringToInt on an arbitrary string and printed its value:

68903-string+to+int.png

No matter what text I enter, the resulting int is always 0- am I doing something obviously wrong here?

The function StringToInt only returns an integer when the string can be interpreted as an integer, e.g. StringToInt will return 101 for the input string “101”. What integer return value did you expect for “Test String”? This is not an integer at all…

I was trying to hash a unique integral value for it, so I could compare any two strings by comparing their int hash instead.

That’s not how the function works though. You can directly compare two strings anyway.