# Compile errors for Delegates when Migrated to 4.6 Version

**URL:** <https://forums.unrealengine.com/t/compile-errors-for-delegates-when-migrated-to-4-6-version/301271>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [December 11, 2014, 10:22am UTC](https://forums.unrealengine.com/t/compile-errors-for-delegates-when-migrated-to-4-6-version/301271 "2014-12-11T10:22:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_016d4684](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_016d4684](https://forums.unrealengine.com/u/anonymous_user_016d4684)\
**Post date:** [December 11, 2014, 10:22am UTC](https://forums.unrealengine.com/t/compile-errors-for-delegates-when-migrated-to-4-6-version/301271/1 "2014-12-11T10:22:15Z")

</div>

After moving the code base to 4.6 version from 4.5.1 version, I get compile error for Dynamic Multicast delegate

Error:  
Error 9 error C2660: ‘FStaminaEventDelegate\_DelegateWrapper’ : function does not take 2 arguments d:\Project\public\AttributeEvent.h 78 1

My code is declaring delegate as:

DECLARE\_DYNAMIC\_MULTICAST\_DELEGATE\_OneParam(FStaminaEventDelegate, float, AttrValue);  
UCLASS(Blueprintable)

class LSF\_API ULSFAttributeEvent : public UActorComponent  
{  
UPROPERTY(BlueprintAssignable)  
FStaminaEventDelegate OnNotifyStamina;  
}

Is there change in Multicast delegate, i tried keeping only float keyword only, removing the comma after float, rebuilding the engine but the error still remains the same.

NOTE: I got rid of all deprecated methods so I get no warnings except for GetMesh,

help if someone already fixed this issue

---

<div class="post-metadata">

**Author:** ![Br\_P\_d](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/br_p_d/32/918657_2.png) [@Br\_P\_d](https://forums.unrealengine.com/u/Br_P_d)\
**Post date:** [December 11, 2014, 2:53pm UTC](https://forums.unrealengine.com/t/compile-errors-for-delegates-when-migrated-to-4-6-version/301271/2 "2014-12-11T14:53:15Z")

</div>

Hi! The \_DelegateWrapper is a function generated by UHT. Is it possible that you’ve got an out of date generated header somehwere? Try a clean and rebuild to see if that sorts it out.

Failing that, are there any earlier compile errors about unknown types or the like?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_016d4684](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_016d4684](https://forums.unrealengine.com/u/anonymous_user_016d4684)\
**Post date:** [December 11, 2014, 4:28pm UTC](https://forums.unrealengine.com/t/compile-errors-for-delegates-when-migrated-to-4-6-version/301271/3 "2014-12-11T16:28:43Z")

</div>

I cleaned the code and rebuilt twice, however the project is from 4.5.1 and it generates new generated.h file when i switch the engine version from 4.5 to 4.6, Yes there are compile errors of unknown types as in other delegates i have used Enum types, does the declaration of delegates and enums out of class giving any errors in 4.6 any ideas?

---

<div class="post-metadata">

**Author:** ![Br\_P\_d](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/br_p_d/32/918657_2.png) [@Br\_P\_d](https://forums.unrealengine.com/u/Br_P_d)\
**Post date:** [December 11, 2014, 4:31pm UTC](https://forums.unrealengine.com/t/compile-errors-for-delegates-when-migrated-to-4-6-version/301271/4 "2014-12-11T16:31:48Z")

</div>

We’ve had a report of unknown enum types in dynamic delegate declarations - in that instance the issue was caused by the generated header being included _before_ the enum definition. We solved this by either forward declaring the enum (for C++11 enum classes), or by ensuring the enumeration is defined before the header is included.

If you could make sure there are no ‘unknown type’ errors, hopefully this will sort out the \_DelegateWrapper issue.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_016d4684](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_016d4684](https://forums.unrealengine.com/u/anonymous_user_016d4684)\
**Post date:** [December 11, 2014, 4:55pm UTC](https://forums.unrealengine.com/t/compile-errors-for-delegates-when-migrated-to-4-6-version/301271/5 "2014-12-11T16:55:54Z")

</div>

Thanks Andrew!!!

moving only one line of generated.h file below Enum declaration solved the issue and 53+ compile errors

---

<div class="post-metadata">

**Author:** ![Br\_P\_d](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/br_p_d/32/918657_2.png) [@Br\_P\_d](https://forums.unrealengine.com/u/Br_P_d)\
**Post date:** [December 11, 2014, 4:57pm UTC](https://forums.unrealengine.com/t/compile-errors-for-delegates-when-migrated-to-4-6-version/301271/6 "2014-12-11T16:57:02Z")

</div>

Great! Often an unrecognized type like this can cause an explosion of compile errors!
