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"

C2618 compile error UPROPERTY

Hi,

I'm running into some weird compile error and I'm currently clueless on what is causing it.

I have a class derived from UDataAsset with the following member:

 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Effects")
     TArray<FSkillSpecialEffectData> SpecialEffects;

Everything compiles fine.

When I try to add this member:

 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Player\|Casting")
         bool RotateCasterToDirectionKey = true;

I get the following compile error:

Data/Structs/Skills/SkillSpecialEffectData.h(30): error C3646: 'ScaleWithStat_StatType': unknown override specifier Data/Structs/Skills/SkillSpecialEffectData.h(30): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int Intermediate\Build\Win64\UE4Editor\Inc\PM\SkillSpecialEffectData.gen.cpp(114): error C2039: 'ScaleWithStat_StatType': is not a member of 'FSkillSpecialEffectData' Structs/Skills/SkillSpecialEffectData.h(13): note: see declaration of 'FSkillSpecialEffectData' Intermediate\Build\Win64\UE4Editor\Inc\PM\SkillSpecialEffectData.gen.cpp(114): error C2618: illegal member designator in offsetof Intermediate\Build\Win64\UE4Editor\Inc\PM\SkillSpecialEffectData.gen.cpp(114): note: offsetof has a builtin meaning; use /Zc:offsetof- to revert to old, non-conforming definition

If I remove the UPROPERTY tag from RotateCasterToDirectionKey, it again compiles fine.

Does anyone have any idea why this is happening? Thanks.

Product Version: UE 4.21
Tags:
more ▼

asked Dec 28 '18 at 01:45 PM in C++ Programming

avatar image

ES-StuBedore
24 3 5

avatar image Evigmae Dec 28 '18 at 05:39 PM

What do you have on the header at line 13 and 30?

What do you have on the cpp at line 114?

does it compile if you remove the \ from the category on

 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Player|Casting")
 bool RotateCasterToDirectionKey = true;
(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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