[Error] This blueprint(self) is not a ThirdPersonGameMode_C

I have the error that i dont know how to fix. Can you help me? On the first picture ThirdPersonCharacter. On the second ThirdPersonGameMode. The warning i know how to fix.

Are you casting the blueprint to itself? If so, you can just call the function you need without casting, it’s already there in your BP.

You’re not connecting the correct things to your function.

Use the GetGamemode Node for the top pin.

Use the GetController Node for the middle pin.

Use the Self Node for the bottom pin.

Use the GetGamemode Node for the top pin.
It does not fit.

I’m casting self (Character) to a player controller which is totally different, to fix the warning needs GetPlayerController > Cast to >> MyPlayerController. To fix the error needs Get Game Mode > Cast to ThirdPersonGameMode > the result of the cast is the target in your event with the error. Thanks, SenToRious.

One error is because you are trying to cast a character to a controller. Casting only works on things that have the same class inheritance. So for example you can cast Animal to Dog, and Dog to Golden Retriever, and Animal to Golden Retriever, but you cannot cast Kitchen Appliance to any of the above.

If you want the controller of the Character then use the character’s Get Controller node.