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"

Unrecognized type 'virtual'. How to fix?

 virtual void BeginPlay() override;

with this definition in the header of a C++ file, i get the compile error 'Unrecognized type 'virtual' - type must be a UCLASS, USTRUCT or UENUM'

anyone got any idea what this means? or how to fix it?

Product Version: UE 4.12
Tags:
more ▼

asked Jul 19 '16 at 08:21 AM in C++ Programming

avatar image

Warlahamaran
16 3 4 7

avatar image NymKappa Jul 19 '16 at 08:34 AM

We need more code to check if you missed something. Please show us at least 5 +/- lines of code around the actual issue.

avatar image Cloudy McStrife Jul 19 '16 at 08:38 AM

Hey Tommy,

The best would be to provide the whole .h file or ar least:

  1. The includes (No .generated.h? False Order of includes...)

  2. The class Definition (Class deriving from Class which derives from UObject)

  3. and the methods before and after BeginPlay (Maybe you forgot a semicolon?)

Greetings Cloudy

avatar image NymKappa Jul 19 '16 at 08:42 AM

Never say to someone to post a whole file. Cause he will probably just post a hundred lines header haha :D

avatar image Cloudy McStrife Jul 19 '16 at 09:28 AM

Ok :D

I didn't think that through xD

avatar image NymKappa Jul 19 '16 at 08:42 AM

Haha see :D..

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

1 answer: sort voted first

Line 29 your wrote

UPROPERTY(BlueprintReadWrite,Category = "Moba|Basic Attack|Internal")

without declaring any property. That's your error

more ▼

answered Jul 19 '16 at 08:43 AM

avatar image

NymKappa
692 32 22 56

(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