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"

Compiler error on Rama's tutorial

I'm following this tutorial (Rama's TCP Socket Listener) and I've encountered the following compiler error:

error C2664: 'void FTimerManager::SetTimer(FTimerHandle &,float,bool,float)': cannot convert argument 1 from 'AYourClass *const ' to 'FTimerHandle &'

I didn't change anything from the tutorial (except moving the code in Laaaaaauuuunch function to BeginPlay function; I even named the class YourClass just like in the tutorial.

Just in case, I'm using VS 2013 and UE 4.10.3.

Any help appreciated, thanks in advance.

Product Version: UE 4.10
more ▼

asked Feb 18 '16 at 06:15 PM in C++ Programming

avatar image

45 3 4 7

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first


The tutorial is out-of-date. The first parameter should be an FTimerHandle object which you should retain in order to identify your timer in future calls:

 FTimerHandle MyHandle;

 // Sets MyHandle
 TimerManager->SetTimer(MyHandle, MyObj, MyDelegate, MyRate);
 // Replaces your previous timer with a new one
 TimerManager->SetTimer(MyHandle, MyObj2, MyDelegate2, MyRate2);
 // Clears your timer


more ▼

answered Feb 18 '16 at 06:58 PM

avatar image

Steve Robb STAFF
2.8k 58 27 99

avatar image jmcorallo Feb 18 '16 at 08:52 PM

Thanks Steve! In case anyone else runs into a similar problem, the documentation here has more details and a useful example

(comments are locked)
10|2000 characters needed characters left
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