x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

DECLARE_DYNAMIC_DELEGATE_ThreeParams() Error

I'm getting an error every time I try to include DECLARE_DYNAMIC_DELEGATE_ThreeParams(); into my .h file. The error says "this declaration has no storage class or type specifier" and that FOnProgress is undefined. I've tried to include the Delegates/Delegate.h header file, but still getting the same error. I've also tried to regenerate my project but still didn't fix this error. What am I doing wrong? Is it a bug?

 #include "CoreMinimal.h"
 #include "UObject/NoExportTypes.h"
 #include "Http.h"
 #include "Delegates/Delegate.h"
 #include "Download.generated.h"
 
 DECLARE_DYNAMIC_DELEGATE_ThreeParams(FOnProgress, const int32, BytesSent, const int32, BytesRecieved, const int32, contentLenght);
 //
 UCLASS()
 class Download_API Downloader : public UObject
 {
     GENERATED_BODY()
 
 public:
 
     FOnProgress OnProgress;
 };
Product Version: UE 4.22
Tags:
more ▼

asked May 06 '19 at 09:31 AM in C++ Programming

avatar image

Bazzy2000
25 2 2 7

avatar image Ascianous May 06 '19 at 11:40 AM

Rather than there being an error here, this feels to me like a stupid intellisense/compiliation problem. Reading around at similar problems, it seems like they all recommend the following (all in Visual Studio) 1) Switch the Solution Configuration (its one of the dropdown menus at the top, next to where you press the green start for the debugger) to any other setting 2) Recompile - this will force all of the headers to be recompiled 3) Switch back to the original setting and recompile again

If it is some intellisense or compilation error, this should resolve it. I appreciate you said you've already regenerated the project but, my previous experience with things like this is sometimes event that doesn't cut it...

avatar image Bazzy2000 May 06 '19 at 12:25 PM

I did what you suggested and got it to work. Thank you!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Solution:

1) Switching the Solution Configuration to any other setting. 2) Recompiling - this will force all of the headers to be recompiled. 3) Switching back to the original setting and recompiling again.

more ▼

answered May 06 '19 at 12:56 PM

avatar image

Bazzy2000
25 2 2 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question