The line:
DECLARE_DELEGATE_OneParam(SetArmorDelegate, TMap<int, FString>)
causes the compile error:
error C4002: too many actual parameters for macro 'DECLARE_DELEGATE_OneParam'
error C2976: 'TMap': too few template arguments
error C2146: syntax error: missing '>' before identifier 'SetArmorDelegate'
error C2143: syntax error: missing '>' before ';'
error C3203: 'TMap': unspecialized class template can't be used as a template argument for template parameter error C2208: 'TBaseDelegate<void,int32>': no members defined using this type
error C4002: too many actual parameters for macro 'DECLARE_DELEGATE_OneParam'
error C2976: 'TMap': too few template arguments
note: see declaration of 'TMap'
error C2146: syntax error: missing '>' before identifier 'SetArmorDelegate'
error C2143: syntax error: missing '>' before ';'
error C3203: 'TMap': unspecialized class template can't be used as a template argument for template parameter 'ParamTypes', expected a real type
error C2208: 'TBaseDelegate<void,int32>': no members defined using this type
Every error being on the same line. However, when I change this line to:
DECLARE_DELEGATE_OneParam(SetArmorDelegate, TArray<int>)
No compile errors.
Additional information:
The line that causes the error is declared inside a class (A UActorComponent, but I don’t think that matters), after GENERATED_BODY(). Both declaring the delegate inside of “private” and outside cause the same errors i.e:
class API myclass : public UActorComponent
{
GENERATED_BODY()
DECLARE_DELEGATE_OneParam(SetArmorDelegate, TMap<int, FString>)
...
and
class API myclass : public UActorComponent
{
GENERATED_BODY()
private:
DECLARE_DELEGATE_OneParam(SetArmorDelegate, TMap<int, FString>)
...
Cause the same error.