ACharacter Functions Can't Be Called With This Structure

Hello.

Why can I call these two functions like this:

KeyDown == true ? Jump() : StopJumping();

But I can’t do it like this

(KeyDown == true ? Jump : StopJumping)();

The first way is a shorthand “If statement”. The else statement must end with a semicolon, thus it cannot be used as an expression.

Hope this helps

Alex

Hello there. But this structure works in pure C++. I tested it completely in Visual Studio and it works. What is the exception in here for UE4?