Resolved. (admins can now put the “Resolved” mark on this topic)
- The first thing that needs to be fixed is the “uint8” enum type. (after 4.11+)
For example in tutorial you will need to replace the
enum class EBatteryPlayState
with
enum class EBatteryPlayState : uint8
This is the reason, that makes IntelliSense being crazy and making all the class methods unrecognizable. For this reason it displays, like 20-30 errors, where it was actually just a single syntax error. Thats the reason why it is hard to find and fix, you just should ignore all the errors related to uclass, it’s namespace or methods and look thorough a whole list of errors, among those 20-30 “fake errors” there are 1-2 real error that break syntax and eventually generate those 20-30 fake errors. Again - dont try to fix them, (most of them are fake), you only need to look at those errors that are not related to Class and fix a single (and the only real) syntax error, that broke the whole Class.
- personally i had 2 more real errors, when a copied the getter and setter for the PlayingState enum, i forgot to rename method’s name according to my project’s name. At this point Visual Studio already displayed like 30 errors, hiding only few real errors, among all of them.
EDIT:
its already mentioned in youtube video’s comments about the “uint8” enum decalaration.
EDIT2:
About header file and IntelliSense.
adding uint8 to enum declaration (and fixing all other mentioned errors as well) will not fix the whole class right away, IntelliSense may take some time and even few minutes later it may not get rid of those errors, i have added a “;” (2 of them in a row, one of them is excessive) into the GameMode.h file right after Enum’s closing bracket, then i saved that file and tried to Build project, after that i removed that excessive “;” and only 30-60 seconds later IntelliSense finally fixed those 30 unexisting errors and after that Build worked successfully. Sometime it may not help, so it is better to restart the Visual Studio to get rid of those errors (restarting works better, more likely to clean those errors from the error log).
Even removing some empty lines between enum and a class declaration, will “summon” a bunch of
“name followed by ‘::’ must be a class or namespace name” and
“a type qualifier is not allowed on a nonmember function”
so those errors are hard to get rid of, once they appear. But anyway compiling goes successfully. So IntellySense errors in such case can be ignored.
In Visual Studio at the bottom there an error log (which displays, IntellySense Error and Build Errors, if i enable “IntelliSense + Build” option, then it will display errors, but in “Build Only” (error filter) then log frame displays none errors, so IntelliSense definitely is bugged at recognizing class declaration in header file whenever some empty lines are added or removed above the class.