There is no Player Location on Add Service

Hello, I’m on Unreal Engine 5 C++ Developer: Learn C++ & Make Video Games course in the Simple Shooter Section on Lecture 192 minute 8:25. When I build my code and I want to Add Service on the Behavior Tree there is no Player Location Sevice like this.

and here is the code

can anyone help me here pls?

Did you successfully compile? Could you show the out of compilation?

wait

Build started at 10:38 PM…
1>------ Build started: Project: EpicGames.Core, Configuration: Development Any CPU ------
2>------ Build started: Project: EpicGames.OIDC, Configuration: Development Any CPU ------
3>------ Build started: Project: SimpleShooter, Configuration: Development_Editor x64 ------
3>Using bundled DotNet SDK version: 6.0.302
3>Running UnrealBuildTool: dotnet “…\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.dll” SimpleShooterEditor Win64 Development -Project=“D:\Danish Folder\Unreal Project\SimpleShooter\SimpleShooter\SimpleShooter.uproject” -WaitMutex -FromMsBuild
3>Log file: C:\Users\User\AppData\Local\UnrealBuildTool\Log.txt
3>Parsing headers for SimpleShooterEditor
3> Running Internal UnrealHeaderTool “D:\Danish Folder\Unreal Project\SimpleShooter\SimpleShooter\SimpleShooter.uproject” “D:\Danish Folder\Unreal Project\SimpleShooter\SimpleShooter\Intermediate\Build\Win64\SimpleShooterEditor\Development\SimpleShooterEditor.uhtmanifest” -WarningsAsErrors -installed
3>Total of 0 written
3>Reflection code generated for SimpleShooterEditor in 14.3624669 seconds
3>Building SimpleShooterEditor…
3>Using Visual Studio 2022 14.36.32543 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
3>Determining max actions to execute in parallel (6 physical cores, 12 logical cores)
3> Executing up to 6 processes, one per physical core
3> Requested 1.5 GB memory per action, 893.1 MB available: limiting max parallel actions to 1
3>------ Building 8 action(s) started ------
3>[1/8] Compile [x64] BTService_PlayerLocationIfSeen.cpp
3>D:\Danish Folder\Unreal Project\SimpleShooter\SimpleShooter\Source\SimpleShooter\BTService_PlayerLocationIfSeen.cpp(36): error C2661: ‘UBlackboardComponent::ClearValue’: no overloaded function takes 0 arguments
3>D:\Danish Folder\Unreal Project\SimpleShooter\SimpleShooter\Source\SimpleShooter\BTService_PlayerLocationIfSeen.cpp(36): note: while trying to match the argument list ‘()’
3>[2/8] Compile [x64] BTTask_Shoot.cpp
3>D:\Danish Folder\Unreal Project\SimpleShooter\SimpleShooter\Source\SimpleShooter\BTTask_Shoot.cpp(6): fatal error C1083: Cannot open include file: ‘AShooterCharacter.h’: No such file or directory
3>[3/8] Compile [x64] ShooterCharacter.cpp
3>D:\Danish Folder\Unreal Project\SimpleShooter\SimpleShooter\Source\SimpleShooter\ShooterCharacter.cpp(7): fatal error C1083: Cannot open include file: ‘GameModeBase.h’: No such file or directory
3>[4/8] Compile [x64] KillEmAllGameMode.cpp
3>D:\Danish Folder\Unreal Project\SimpleShooter\SimpleShooter\Source\SimpleShooter\KillEmAllGameMode.h(17): error C3668: ‘AKillEmAllGameMode::PawnKilled’: method with override specifier ‘override’ did not override any base class methods
3>D:\Danish Folder\Unreal Project\SimpleShooter\SimpleShooter\Source\SimpleShooter\KillEmAllGameMode.cpp(9): error C2039: ‘PawnKilled’: is not a member of ‘AGameModeBase’
3>D:\Danish Folder\Unreal Engine\UE_5.3\Engine\Source\Runtime\Engine\Classes\GameFramework\GameModeBase.h(46): note: see declaration of ‘AGameModeBase’
3>D:\Danish Folder\Unreal Project\SimpleShooter\SimpleShooter\Source\SimpleShooter\KillEmAllGameMode.cpp(9): error C2064: term does not evaluate to a function taking 1 arguments
3>[5/8] Compile [x64] KillEmAllGameMode.gen.cpp
3>D:\Danish Folder\Unreal Project\SimpleShooter\SimpleShooter\Source\SimpleShooter\KillEmAllGameMode.h(17): error C3668: ‘AKillEmAllGameMode::PawnKilled’: method with override specifier ‘override’ did not override any base class methods
3>Total time in Parallel executor: 735.47 seconds
3>Total execution time: 756.51 seconds
3>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ““D:\Danish Folder\Unreal Engine\UE_5.3\Engine\Build\BatchFiles\Build.bat” SimpleShooterEditor Win64 Development -Project=“D:\Danish Folder\Unreal Project\SimpleShooter\SimpleShooter\SimpleShooter.uproject” -WaitMutex -FromMsBuild” exited with code 6.
3>Done building project “SimpleShooter.vcxproj” – FAILED.
========== Build: 2 succeeded, 1 failed, 8 up-to-date, 0 skipped ==========
========== Build completed at 10:51 PM and took 12:57.644 minutes ==========

here is the output @DanM

Sam added a virtual function in his ASimpleGameMode class

You didn’t have this class so you don’t have that virtual function. So you aren’t overriding anything.
If you want to follow along with the course, create a new class using AGameModeBase and add that, then re-parent AKillEmAllGameMode with that class.

add the code?

but I don’t have the GameModeBase C++ file, So how do I add the code @DanM ?

Did you miss this part of what I wrote?

i.e. Create ASimpleShooterGameModeBase using AGameModeBase as its parent class, add that virtual function, and re-parent your AKillEmAllGameMode to use it i.e. where it currently says

: public AGameModeBase

after creating the class make it

: public ASimpleShooterGameModeBase

and don’t forget to include the header for it.

how do I reparent the AKillEmAllGameMode?

I explained at the end of my reply.

So I name the GameModeBase SimpleShooterGameModeBase?

You edit the line in KillEmAllGameMode.h as described above.

like this right?

Almost.

where do I put the Header? On the KillEmAllGameMode?

In the KillEmAllGameMode.h, change the include for GameModeBase to the simple shooter game mode you made.


like this?

No. That header is not within a GameFrameworks folder. The file name also doesn’t have an ‘A’ prefix.

#include "SimpleShooterGameModeBase.h"

I suggest you go back to section 2 or look a basic C++ tutorial such as www.learncpp.com as you are struggling with the basics

like this?

Privacy & Terms