How to read return value of interface function in C++?

Epok
Fri, 18 Aug 2017 22:34:48 +0000
UI

Hi,

I have declared an interface function which returns a boolean.

 UFUNCTION(BlueprintNativeEvent)
 bool CanPickup();

When I call the function I don’t understand how I am meant to read the value of the boolean being returned. The following interface call:

if (IBTWorldInteractionInterface::Execute_CanPickup(HoveredObject))
{
}

… returns the error:

error C2059: syntax error: 'if'

2 posts - 1 participant