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"

missing type specifier - int assumed

Hello, I have the following code in my header that works fine:

 UAnimInstance* Animation;

However, when I change it to an extended UAnimInstance I made:

 UUnitAnimInstance* Animation;

I get all kinds of errors:

 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
 error C2143: syntax error : missing ';' before '*'

And then errors for every part of my code that is using Animation. Why would it be doing this?...

Here's the Extended code

 UCLASS(transient, Blueprintable, hideCategories = AnimInstance, BlueprintType)
 class THIRDPERSON_API UUnitAnimInstance : public UAnimInstance

Any ideas why my extended class is causing so many problems, even though it's not that different? (I followed a tutorial for it)


Note: I tried changing UCLASS back to empty, and having an empty extended class, it always makes that error though.

Product Version: UE 4.9
more ▼

asked Sep 13 '15 at 01:29 AM in C++ Programming

avatar image

152 38 37 45

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

1 answer: sort voted first


Are you including the header file for the extended animinstance class ? or try using :

  class UUnitAnimInstance* Animation;


more ▼

answered Sep 13 '15 at 03:29 AM

avatar image

111 4 2 5

avatar image Juice-Tin Sep 13 '15 at 05:04 PM

having 'class' in the .h and #include "UUnitAnimInstance.h" in the cpp did the trick.

Thankyou. :)

(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