# Problem Delegate declaration VS 2022

**URL:** <https://forums.unrealengine.com/t/problem-delegate-declaration-vs-2022/1262048>\
**Category:** C++\
**Tags:** unreal-engine, delegates, question, CPP\
**Created:** [August 15, 2023, 5:07pm UTC](https://forums.unrealengine.com/t/problem-delegate-declaration-vs-2022/1262048 "2023-08-15T17:07:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mustang4484](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mustang4484](https://forums.unrealengine.com/u/mustang4484)\
**Post date:** [August 15, 2023, 5:07pm UTC](https://forums.unrealengine.com/t/problem-delegate-declaration-vs-2022/1262048/1 "2023-08-15T17:07:16Z")

</div>

Hi guys  
I’ve a problem with this declaration of delegate on my VS 2022:

```auto
#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MyActorTT.generated.h"

DECLARE_MULTICAST_DELEGATE_OneParam(FOnScoreChanged, float, NewScore); 
UCLASS()
class TESTRTS_API AMyActorTT : public AActor
{
		GENERATED_BODY()
	
public:	
	UPROPERTY(BlueprintAssignable)
	FOnScoreChanged OnScoreChange;
	// Sets default values for this actor's properties
	AMyActorTT();
	

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:	
	
	// Called every frame
	virtual void Tick(float DeltaTime) override;

};

```

This is the error: TestRTS/MyActorTT.h(16) : Error: Unrecognized type ‘FOnScoreChanged’ - type must be a UCLASS, USTRUCT, UENUM, or global delegate.

I’ve try to build solution, delete old sln and generate a new,etcc…  
Some problem when use dynamic delegate.

Any solution?

Thank you!!

---

<div class="post-metadata">

**Author:** ![UnrealEverything](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UnrealEverything](https://forums.unrealengine.com/u/UnrealEverything)\
**Post date:** [August 16, 2023, 6:07am UTC](https://forums.unrealengine.com/t/problem-delegate-declaration-vs-2022/1262048/2 "2023-08-16T06:07:22Z")

</div>

You need to use the `DYNAMIC` variants of delegates in order to be used with `UPROPERTY`. Dynamic delegates have support for serialization that regular delegates do not have. What error do you get when you use those?

> **[Dynamic Delegates](https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Delegates/Dynamic/)**
>
> Delegates that can be serialized and support reflection.
