# Getting error when trying to implement blueprint native event function

**URL:** <https://forums.unrealengine.com/t/getting-error-when-trying-to-implement-blueprint-native-event-function/428770>\
**Category:** C++\
**Tags:** unreal-engine, implementation, Blueprint, CPP, question\
**Created:** [July 5, 2018, 4:26pm UTC](https://forums.unrealengine.com/t/getting-error-when-trying-to-implement-blueprint-native-event-function/428770 "2018-07-05T16:26:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_44db827a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_44db827a](https://forums.unrealengine.com/u/anonymous_user_44db827a)\
**Post date:** [July 5, 2018, 4:26pm UTC](https://forums.unrealengine.com/t/getting-error-when-trying-to-implement-blueprint-native-event-function/428770/1 "2018-07-05T16:26:15Z")

</div>

I am getting error C2535 (“member function already defined or declared”) when trying to declare a blueprint native event on my Character script. It works perfectly fine if I declare the implementation function by itself, however adding the actual event and the UFUNCTION macro will cause me to get this error. Any ideas why this could be? I am using the same syntax, which already worked for me on other scripts.

```
UFUNCTION(BlueprintNativeEvent, Category = "Character")
	void Interact();

	virtual void Interact_Implementation();

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6789817d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6789817d](https://forums.unrealengine.com/u/anonymous_user_6789817d)\
**Post date:** [July 9, 2018, 2:48pm UTC](https://forums.unrealengine.com/t/getting-error-when-trying-to-implement-blueprint-native-event-function/428770/2 "2018-07-09T14:48:28Z")

</div>

Are you trying to implement “Interact” in your source file? If so, that would be the cause of your error.

---

<div class="post-metadata">

**Author:** ![VolatileAgent](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@VolatileAgent](https://forums.unrealengine.com/u/VolatileAgent)\
**Post date:** [July 10, 2018, 10:18pm UTC](https://forums.unrealengine.com/t/getting-error-when-trying-to-implement-blueprint-native-event-function/428770/3 "2018-07-10T22:18:15Z")

</div>

It would help to know which line the error occurs on, and to see the rest of the file before that point.

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [July 10, 2018, 11:36pm UTC](https://forums.unrealengine.com/t/getting-error-when-trying-to-implement-blueprint-native-event-function/428770/4 "2018-07-10T23:36:42Z")

</div>

That because when you place BlueprintNativeEvent, UHT will automatically generate deceleration of \_Implementation function by it self, thats why you getting “already declared” error. It’s doing that because 1. It needs that function to be declared for compiler to build generated code 2. So you don’t need to declare it when you don’t need it, other wise you would get undenefied function errors, forcing you to declare it . Just place function definition in cpp file and thats it.

Remember that UHT generated code for you function and paste via GENERATED\_BODY() macro

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_44db827a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_44db827a](https://forums.unrealengine.com/u/anonymous_user_44db827a)\
**Post date:** [July 11, 2018, 8:54am UTC](https://forums.unrealengine.com/t/getting-error-when-trying-to-implement-blueprint-native-event-function/428770/5 "2018-07-11T08:54:28Z")

</div>

No, I was not.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_44db827a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_44db827a](https://forums.unrealengine.com/u/anonymous_user_44db827a)\
**Post date:** [July 11, 2018, 8:55am UTC](https://forums.unrealengine.com/t/getting-error-when-trying-to-implement-blueprint-native-event-function/428770/6 "2018-07-11T08:55:25Z")

</div>

Thank you for your reply - I am sure you are right, unfortunately at this point I have no idea of telling because I just ended up using BlueprintImplementableEvent instead. I do find it weird that for other actors, using it the way I did was perfectly fine…

---

<div class="post-metadata">

**Author:** ![JaimeCifuentes](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jaimecifuentes/32/489266_2.png) [@JaimeCifuentes](https://forums.unrealengine.com/u/JaimeCifuentes)\
**Post date:** [February 16, 2022, 11:26am UTC](https://forums.unrealengine.com/t/getting-error-when-trying-to-implement-blueprint-native-event-function/428770/7 "2022-02-16T11:26:41Z")

</div>

For future reference to others caught by this trap 🙂

If you use on your class GENERATED\_UCLASS\_BODY()  
Then the UHT automatically generates the virtual function declaration, so you can not write another one on the same .h file.

I ended changing the GENERATED\_UCLASS\_BODY (which is legacy) for GENERATED\_BODY and everything compiles again.
