Error C4430 & C2143 implementing GAS

Helloooooooo FOLKS!!!

I’m having really bad time trying to implement GAS in a project.
I’m a newbie about Unreal/C++, got experience on Unity/C#.

I found a guide about GAS

When he builds at 20.30 I got an error on AttributeSet.h

BUT THAT IS STUFF GIVEN BY THE PLUGIN I DIDN’T TOUCH IT…at least I’m almost sure I didn’t touch it.

I downloaded that guide repository a few weeks ago and looked at how he handled all of it in his project.
Now it is giving me the same error in his project when I try to open it from the solution…

Any ideas? If you need more infos just let me know what!!

That’s strange, already added the modules to your project build.cs?

If not, try adding this to PublicDependencyModuleNames in your project build.cs:

"GameplayAbilities",
"GameplayTags",
"GameplayTasks",

I already did it!

Here is my last log file

Build started 7/12/2021 8:05:18 AM.
Logging verbosity is set to: Normal.     1>Project "D:\Unreal Projects\OnlineSubsystemTest\OnlineSubsystemTest.sln" on node 1 (Games\OnlineSubsystemTest target(s)).
     1>ValidateSolutionConfiguration:
         Building solution configuration "Development Editor|Win64".
       ValidateProjects:
         The project "UE4" is not selected for building in solution configuration "Development Editor|Win64".
     1>Project "D:\Unreal Projects\OnlineSubsystemTest\OnlineSubsystemTest.sln" (1) is building "D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj" (2) on node 1 (default targets).
     2>Build:
         "D:\Epic Games\UE_4.27\Engine\Build\BatchFiles\Build.bat" OnlineSubsystemTestEditor Win64 Development -Project="D:\Unreal Projects\OnlineSubsystemTest\OnlineSubsystemTest.uproject" -WaitMutex -FromMsBuild
         Using 'git status' to determine working set for adaptive non-unity build (D:\Unreal Projects\OnlineSubsystemTest).
         Invalidating makefile for OnlineSubsystemTestEditor (OnlineSubsystemTestEditor.Target.cs modified)
         Building OnlineSubsystemTestEditor...
         Using Visual Studio 2019 14.28.29913 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
         Building 17 actions with 8 processes...
           [1/17] OnlineSubsystemTest.init.gen.cpp
           [2/17] SessionMenuInterface.cpp
           [3/17] SessionMenuInterface.gen.cpp
           [4/17] OnlineSubsystemTestGameMode.gen.cpp
           [5/17] TestGameInstance.gen.cpp
           [6/17] OnlineSubsystemTestGameMode.cpp
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(64): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(194): error C2143: syntax error: missing ';' before '<class-head>' [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(194): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(196): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(277): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
           [7/17] OnlineSubsystemTestCharacter.gen.cpp
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(64): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(194): error C2143: syntax error: missing ';' before '<class-head>' [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(194): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(196): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(277): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
           [8/17] OnlineSubsystemTest.cpp
           [9/17] OnlineSubsystemTestCharacter.cpp
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(64): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(194): error C2143: syntax error: missing ';' before '<class-head>' [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(194): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(196): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
     2>D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(277): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
           [10/17] RoomButtonWidget.cpp
           [11/17] MainMenu.gen.cpp
           [12/17] RoomButtonWidget.gen.cpp
           [13/17] MainMenu.cpp
           [14/17] TestGameInstance.cpp
     2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(45,5): error MSB3073: The command ""D:\Epic Games\UE_4.27\Engine\Build\BatchFiles\Build.bat" OnlineSubsystemTestEditor Win64 Development -Project="D:\Unreal Projects\OnlineSubsystemTest\OnlineSubsystemTest.uproject" -WaitMutex -FromMsBuild" exited with code 6. [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
     2>Done Building Project "D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj" (default targets) -- FAILED.
     1>Done Building Project "D:\Unreal Projects\OnlineSubsystemTest\OnlineSubsystemTest.sln" (Games\OnlineSubsystemTest target(s)) -- FAILED.

Build FAILED.

       "D:\Unreal Projects\OnlineSubsystemTest\OnlineSubsystemTest.sln" (Games\OnlineSubsystemTest target) (1) ->
       "D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj" (default target) (2) ->
       (Build target) -> 
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(64): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(194): error C2143: syntax error: missing ';' before '<class-head>' [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(194): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(196): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(277): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(64): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(194): error C2143: syntax error: missing ';' before '<class-head>' [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(194): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(196): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(277): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(64): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(194): error C2143: syntax error: missing ';' before '<class-head>' [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(194): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(196): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         D:\Epic Games\UE_4.27\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h(277): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]
         C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(45,5): error MSB3073: The command ""D:\Epic Games\UE_4.27\Engine\Build\BatchFiles\Build.bat" OnlineSubsystemTestEditor Win64 Development -Project="D:\Unreal Projects\OnlineSubsystemTest\OnlineSubsystemTest.uproject" -WaitMutex -FromMsBuild" exited with code 6. [D:\Unreal Projects\OnlineSubsystemTest\Intermediate\ProjectFiles\OnlineSubsystemTest.vcxproj]

    0 Warning(s)
    16 Error(s)

Time Elapsed 00:02:58.91

你解决这个GAS问题了吗