So I have a widget which contains a Text Box. The intention is for the player to edit the value in the Text Box, which will update an Integer value stored elsewhere. I’m finding my blueprint breaks if the player enters any value other than an integer (ie, “34a”). I’d like to add a branch into this blueprint which initially checks if the value the player entered is an integer or not. What is the proper way to check this?
There is a function IsNumeric
that takes a string argument and returns bool, So if you have a text
, convert it to string
and then call IsNumeric
Like this:
1 Like
Perfect, thanks! I suppose after the True pin, I’ll run my result through a Truncate or something to insure I’m not working with a Float. Thanks for your help =)
Second question though, how did you format your text so that IsNumeric and Text stand out like that?
I put it into backticks
(this character: `)
Or simply mark the word and click the 101010 button.
test
This is another test
Thanks =)