Input.isNumeric() return false even if I insert a number

Hi, I’m Cristian Palmas. I’m attending the Unreal Engine 4.22 course on Udemy.

In the Bull Cow Game i checked the Input in order to avoid the insertion of numbers. So I coded like that:

if (Input.isNumeric())
{
     // Print error message
     // say to try again inserting a word and not a number
}

It’s not working so I suppose it return false even if I digit “1” at the prompt.

That is working as expected for me. Did you enter other characters by accident e.g. including a space before 1?

Hi , DanM. No, only “1”.
Anyway, I was posting that I solved the problem: I don’t know why but I recompiled the same code and the if block worked as expected. It seems it was an engine compiling error, though there weren’t compiling error messages.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms