Download

Cannot create custom game state on Vehicle Project

It works perfectly fine when I create the custom game state on a third person project, but when I do it on the vehicle project i got the following errors.

Recompiling VehicleProject…
Launching UnrealBuildTool… [C:/Program Files/Epic Games/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe VehicleProject -ModuleWithSuffix VehicleProject 4448 Win64 Development -editorrecompile -canskiplink “C:/Users/sing/Desktop/year3/game/VehicleProject/VehicleProject.uproject” -rocket -rocket]
CompilerResultsLog: New page: Compilation - Feb 23, 2016, 3:44:23 PM
CompilerResultsLog: Info Performing full C++ include scan (hot reloading a new target)
CompilerResultsLog: Info Creating makefile for hot reloading VehicleProject (no existing makefile)
CompilerResultsLog: Info Compiling game modules for hot reload
CompilerResultsLog: Info Parsing headers for VehicleProjectEditor
CompilerResultsLog: Info Running UnrealHeaderTool “C:/Users/sing/Desktop/year3/game/VehicleProject/VehicleProject.uproject” “C:\Users\sing\Desktop\year3\game\VehicleProject\Intermediate\Build\Win64\VehicleProjectEditor\Development\UnrealHeaderTool.manifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -rocket -installed
CompilerResultsLog: Info Reflection code generated for VehicleProjectEditor in 11.7967693 seconds
CompilerResultsLog: Info Performing 3 actions (4 in parallel)
CompilerResultsLog: Info MyGameState.cpp
CompilerResultsLog: Info VehicleProject.generated.cpp
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(13) : error C2504: ‘AInfo’ : base class undefined
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(14) : error C2146: syntax error : missing ‘;’ before identifier ‘Super’
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(13) : error C2504: ‘AInfo’ : base class undefined
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(14) : error C2146: syntax error : missing ‘;’ before identifier ‘Super’
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(154) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(154) : error C4183: ‘HIDE_ACTOR_TRANSFORM_FUNCTIONS’: missing return type; assumed to be a member function returning ‘int’
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(14) : error C3668: ‘AGameState::_getUObject’ : method with override specifier ‘override’ did not override any base class methods
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(14) : error C3668: ‘AGameState::GetLifetimeReplicatedProps’ : method with override specifier ‘override’ did not override any base class methods
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(94) : error C3668: ‘AGameState::PostInitializeComponents’ : method with override specifier ‘override’ did not override any base class methods
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(154) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-intC:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(14) : error C2440: ‘return’ : cannot convert from ‘AGameState *’ to ‘UObject *’
CompilerResultsLog: Info
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(154) : error C4183: ‘HIDE_ACTOR_TRANSFORM_FUNCTIONS’: missing return type; assumed to be a member function returning ‘int’
CompilerResultsLog: Info Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(14) : error C3668: ‘AGameState::_getUObject’ : method with override specifier ‘override’ did not override any base class methods
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(14) : error C3668: ‘AGameState::GetLifetimeReplicatedProps’ : method with override specifier ‘override’ did not override any base class methods
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(94) : error C3668: ‘AGameState::PostInitializeComponents’ : method with override specifier ‘override’ did not override any base class methods
CompilerResultsLog:Error: Error C:\Program Files\Epic Games\4.9\Engine\Source\Runtime\Engine\Classes\GameFramework/GameState.h(14) : error C2440: ‘return’ : cannot convert from ‘AGameState *’ to ‘UObject *’
CompilerResultsLog: Info Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
CompilerResultsLog:Error: Error c:\users\sing\desktop\year3\game\vehicleproject\source\vehicleproject\MyGameState.h(14) : error C2440: ‘return’ : cannot convert from ‘AMyGameState *’ to ‘UObject *’
CompilerResultsLog: Info Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
CompilerResultsLog:Error: Error C:\Users\sing\Desktop\year3\game\VehicleProject\Source\VehicleProject\MyGameState.h(14) : error C2440: ‘return’ : cannot convert from ‘AMyGameState *’ to ‘UObject *’
CompilerResultsLog: Info Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
CompilerResultsLog: Info -------- End Detailed Actions Stats -----------------------------------------------------------
CompilerResultsLog: Info ERROR: UBT ERROR: Failed to produce item: C:\Users\sing\Desktop\year3\game\VehicleProject\Binaries\Win64\UE4Editor-VehicleProject-4448.dll
CompilerResultsLog: Info Total build time: 20.95 seconds
LogMainFrame: MainFrame: Module compiling took 21.022 seconds
Warning: HotReload failed, recompile failed
Warning: RebindPackages failed because the compiler could not be started.

This project is brand new haven’t changed anything or added anything, just trying to create the custom game state.

I am having the same difficulties, can someone help please?

Could it be, that your Project Header file contains “#include EngineMinimal.h” or something like that, instead of “#include Engine.h”? :x Just a random guess.

Tried this but didn’t work, in my case I’m trying to store a pointer to my current GameState:

.h


AVR_GameState* C_GetGameState;

.cpp


C_GetGameState = Cast<AVR_GameState>(GetWorld()->GetGameState());

Any suggestions?

Any log files or the VS output log?