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

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'

It is actually as simple as:

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

The line before where I checked if the object implemented the interface was missing a closing bracket, and therefore causing a compile error. Oops…

if (HoveredObject->GetClass()->ImplementsInterface(UBTWorldInteractionInterface::StaticClass()))