Have you tried compiling the code through the editor?
I constantly face such “ridiculous errors” but the code compiles and works as expected. I may be wrong (sure hope so), but unfortunately it seems Intellisense is just not suited for Unreal… so I just “learned” to mostly ignore it and pay attention to error logs in Unreal.
Instead of using Visual Studio 2017 I suggest you to use Visual Studio 2015 community. B’cause i have both VS 2017 & VS 2015 so , when i used VS 2017 it was showing error but when i used 2015 Visual Studio then then okay . I’m think so they don’t have configuration of Visual Studio 2017 community with Unreal Engine 4 yet , I’m not sure may be they are in progress .
Thanks for the quick response.
Yes, the code did allways compile flawlessly in the editor, I was just annoyed, that my IDE would allways remind me of non-existing errors… I guess this can’t be helped at the moment.
Agreed. If you have both 15 and 17 installed, go with 15. I tried to get rid of 15, but nothing I could do actually got rid of everything so I reformatted and installed only 17. Works perfectly now.
So first of all switching to VS2015-Community made all my existing code ‘incompatible’, that sucks. Besides that most of the errors are gone, except the one you can see in the picture “error2.png”. That one is still here…
Just to wrap this up, here’s what I discovered as best practice after a lot of trial an error (got all errors to disappeare):
As allready stated ealier, switching to VS2015 may be a good idea (it solved some of the errors in my code).
In your header files do NOT include other header files under the “[YourClassName].generated.h” line.
Generally things work out best for me, if I go with forward declaration in the header files and full including in the .cpp files.
In the end this isn’t important at all, as long as the compile process inside the editor works, but if you’re like me, removing those red wavy lines under your code is just way more satisfying