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"

Problem with USTRUCT

I created a new header file called "QuestionData.h", added in to my project and put this code into it:

  #pragma once

   #include "QuestionData.generated.h"

   USTRUCT() 
   struct QuestionData {     
      GENERATED_USTRUCT_BODY()

      UPROPERTY(EditAnywhere, BlueprintReadWrite)     
      TArray<FString> Tekst; 
   };

But Visual underlines #include, USTRUCT, GENERATED_USTRUCT_BODY(). Says that it cannot open QuestionData.generated.h, that identifier GENERATED_USTRUCT_BODY() is undefined and that USTRUCT is missing some explicit type (so 'int' was assumed). I think that I did everything right and this should work and when I open some Blueprint, create a variable there I should be able to choose the type of that variable to be my QuestionData structure (but I can't do that, there's no QuestionData structure in Blueprint). So what's wrong? I work on 4.1.0 version of UE4.

Product Version: Not Selected
Tags:
more ▼

asked Jun 19 '14 at 02:55 PM in C++ Programming

avatar image

alwalt93
20 7 8 11

avatar image Iatsu May 24 '15 at 06:53 PM

did you solve this?

avatar image HAH May 25 '15 at 12:58 AM

What compiler output do you get? The squiggles of Visual Studio are not always errors, e.g. they disappear after the Unreal Build System has generated files. (Greetings from The Netherlands!)

avatar image Iatsu May 25 '15 at 01:02 AM

yeah, turns out so, at least for me I had my own topic too, thanks for the reply though! Netherlands is a beautiful place.

(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