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"

Intellisense false errors

I would like to reiceive intellisense suggestions however, intellisense says there is an error and doesn't show me any suggestion. The code does compile. I am following the BatteryCollector tutorial series that is given in UE4 video tutorials page. I heard that it's normal to get these errors but the woman who made the tutorials get the suggestions and no errors.

[Edit start] Using latest version of UE4, 4.16.3. The error happens when using VS 2015 and when using VS 2017 (which are the only options). [Edit end]

Examples: Tutorial 2 or 3 - Error: a value type of "UStaticMeshComponent " cannot be assigned to an entity of type "USceneComponent *" (note: UStaticMeshComponent is also a pointer, but if I place an asterisk part of the text gets in italic.)

 RootComponent = PickupMesh;


Tutorial 6 - Error: pointer to incomplete class type is not allowed

 FVector SpawnLocation = SpawnBox->Bounds.Origin


Tutorial 6 - Error: a value type of "UBoxComponent " cannot be assigned to an entity of type "USceneComponent *" (note: UBoxComponent is also a pointer, but if I place an asterisk part of the text gets in italic.)

 RootComponent = SpawnBox

Thanks!

Product Version: UE 4.16
Tags:
more ▼

asked Aug 06 '17 at 09:35 PM in C++ Programming

avatar image

KingOfNothing
6 1 4 5

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

2 answers: sort voted first

I asked for help at the Discord server (Unreal Slackers) where LethalClips told me that on version 4.15 there was an update on which most libraries must be included. I fixed the errors by including the components: #include "Components/StaticMeshComponent.h" and #include "Components/BoxComponent.h"

Also, I tried something like this before (saw that suggestion while searching for solutions) but used the wrong library. In order to find the library, check the path to the class you're using in the link to the documentation.

You may also get some compile errors as I did get after. But as long as you include the libraries it works perfectly, intellisense suggestions too! :3

Example: for UBoxComponent, go to the Unreal Engine Documentation website and search for "UBoxComponent", make sure it's searching in the C++ API (after you search, buttons appear, where choose in which category you wish to search on, such as "All", "Documentation", "C++ API", "Blueprint API",etc.) now check the last tab, "References", for the header to include. For UBoxComponent it's #include "Components/UBoxComponent"

Edit: Typo fix and making the text easier to understand.

Edit2: Updated to the correct method to the header to include.

more ▼

answered Aug 07 '17 at 06:17 PM

avatar image

KingOfNothing
6 1 4 5

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

Sometimes the Intellisense can be wrong when the build has no errors. Try opening the project and compiling. If the compile completed successfully then you all set!

more ▼

answered Aug 07 '17 at 03:55 PM

avatar image

TjisAwesom
12 1 5 7

avatar image KingOfNothing Aug 07 '17 at 06:30 PM

"I heard that it's normal to get these errors but the woman who made the tutorials get the suggestions and no errors.", I did say this. But thanks still. ^^

(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