ImplementationDeclaration

Hi,

I’ve just finished Lauren’s youtube tutorial series gettings started C++.

Since then alot has changed with the engine. I wanted to fix warnings.

I don’t understand what I’m supposed to do about this warning:

Im on UE4.7 Preview 2

Best regards,

Hi.

You should manually add OnPickedUp_Implementation() function in your .cpp file of Pickup class. Just like this:



void APickup::OnPickedUp_Implementation()
{
    ...
}


I have not seen the tutorial series you’re talking about so i can’t really tell you what should be inside the function. But i guess it was meant to be overridden in Blueprint, so it should be an empty function, if nothing had to be done in base class.

Hi,

That’s the way server rpc are usually defined, but since 4.7 the same code that used to work now generates those warnings.
I don’t understand the warning, but i am a c++ baby, so maybe it means something clear.

I started a similar thread a few hours ago.

Cheers
Cedric

Hi, ok thanks for the replies.

Header


UFUNCTION(BlueprintNativeEvent)
	void OnPickedUp();

.cpp


void APickup::OnPickedUp_Implementation()
{

}

I guess 4.7 issue then.

Thanks

Don’t have 4.7, but that warning seems pretty clear: It’s telling you to declare OnPickedUp_Implementation yourself because the UnrealHeaderTool will no longer do it come next version. The fix would be to declare both functions:


UFUNCTION(BlueprintNativeEvent)
void OnPickedUp();

virtual void OnPickedUp_Implementation();


CPP file remains the same, with only one definition for OnPickedUp_Implementation.

See if that works.

That was correct, thank you.

Wonder why they switch it?