-5

Fairly new to C++ and not exactly sure what is happening. I've done this for other classes but for this one for some reason i keep getting this error (I also get this error for the start focus function):

LNK2005 "public: void __cdecl AUsableActor::EndFocusItem(void)" (?EndFocusItem@AUsableActor@@QEAAXXZ) already defined in UsableActor.cpp.obj

Here are my files:

UsableActor.h

https://gyazo.com/43291630a281e68d0625734a75bd25cf

UsableActor.cpp

https://gyazo.com/e638b7d7297f2e490d9adea91378b52d

Tried to get code to work, kept saying I had unformatted code on stackoverflow sorry.

Community
  • 1
  • 1
user2790999
  • 13
  • 1
  • 6

1 Answers1

1

You're declaring it as a BlueprintImplementableEvent, meaning it will not have a C++ implementation, but rather should be implemented in a blueprint 'subclass'.

If you want a C++ implementation, look up BlueprintNativeEvent. Otherwise, add no C++ implementation in the .cpp file and it should compile!

Bas in het Veld
  • 1,271
  • 10
  • 17