Unreal Engine 5 C++: Make Your Own Action Combat Game Lecture 31

In lecture 31. Observer Pattern I copied the instructor’s code on this link and it didn’t work (23. Observer Pattern (5a8d6b45) · Commits · GameDev.tv / Unreal Action Combat / GameDev.tv - Unreal Action Combat · GitLab)
Somehow my Unreal can’t compile successfully
Something about Broadcast is not a member of fonupdatedtargetsignature and see declaration of fonupdatedtargetsignature


Here’s my log

Here’s my lockon header file

Here’s my lockon cpp file
I dit restart UE but still did not compile

Your class name case in the delegate is wrong. You called your class ULockonComponent but the instructor used ULockOnComponent. The cases don’t match.

All the errors you’ve shared are for exactly this issue.

Sorry, which line is it i couldn’t find it
Edit: I got it, mine was
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_OneParam(
FOnUpdatedTargetSignature,
ULockOnComponent, OnUpdatedTargetDelegate,
AActor*, NewTargetActorRef
);
And the instructor’s
DECLARE_DYNAMIC_MULTICAST_SPARSE_DELEGATE_OneParam(
FOnUpdatedTargetSignature,
ULockonComponent, OnUpdatedTargetDelegate,
AActor*, NewTargetActorRef
);

The o in LockOn should be lower case o, not a capital.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms