Download

BTTaskNode is broken?? C++ UE4

Hi people,
I’m quite new to c++ and ue4 and I’ve been following an AI tutorial. However when I want to create a BTTask Node c++ class my ue4 crashes and I get this message.

Successfully added class ‘BTSelectPatrolPoint’, however you must recompile the ‘Stealth’ module before it will appear in the Content Browser. Failed to automatically hot reload the ‘Stealth’ module.
Would you like to open the Output Log to see more details?

And then I get these errors from the Output Log and whenever I try to build my project in visual studio:
CompilerResultsLog: Error: BTSelectPatrolPoint.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)” (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
CompilerResultsLog: Error: BTSelectPatrolPoint.gen.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)” (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)
CompilerResultsLog: fatal error LNK1120: 1 unresolved externals

I have tried many known solutions such as adding “AIModule” to the build.cs file and I’ve deleted and generated my visual studio files again but none of them seems to work.

Appreciate any help at all, thanks :slight_smile:

May be your build.cs missesGameplayTasksmodule?

Thanks so much, I had no idea that I needed that in the file and it shows how much I’ve still got to learn :smiley:

Yeah, I’m in the same bus :slight_smile:
Here the two bests learning ressources I found :
1- The source code itself.
With VisualAssist, you just select a class, a function or a variable, type alt+G and it jumps you directly to the definition.
2- the API reference, sometimes it’s faster than the code itself to fing headers and modules.

Thanks for the help friend :slight_smile: