Error compiling C ++ project

I did the Steam integration to ue4 and the project, I activated the steam subsystem plugin and online subsytem plugin, I edited build.cs and DefaultEngine.ini and Target.cs
I fully recompile the project by visual studio but the target.cs is giving this error.

C: \ Users \ Soneca \ Documents \ Unreal Projects \ MyGamer \ Source \ MyGamer.Target.cs (17,8): error CS1520: The method must have a MyGamer return type C: \ Users \ Projects \ MyGamer \ Intermediate \ ProjectFiles \ UnrealBuildTool 1

Unable to compile source files.

Error msb3073 The “C: \ Program Files \ Epic Games \ EU_4.19 \ Engine \ Build \ BatchFiles \ Rebuild.bat” command “MyGamerEditor Win64 Development” C: \ Users \ Soneca \ Documents \ Unreal Projects \ MyGamer \ MyGamer.uproject “-WaitMutex -FromMsBuild” terminated with code -1. MyGamer C: \ Program Files (x86) \ Microsoft Visual Studio \ 2017 \ Enterprise \ Common7 \ IDE \ VC \ VCTargets \ Microsoft.MakeFile.Targets 49

Hey,

your GenericShoorterTarget doesn’t return any value (void, bool, etc.).

public ??? GenericShoorterTarget(TargetInfo Target)

Without return type, you can only create constructors, but they need have the same name as the class name.

Leave only MyGamerTarget and comment/delete the rest.

using UnrealBuildTool;
using System.Collections.Generic;

public class MyGamerTarget : TargetRules
{
	public MyGamerTarget(TargetInfo Target) : base(Target)
	{
		Type = TargetType.Game;
		ExtraModuleNames.Add("MyGamer");
		UEBuildConfiguration.bCompileSteamOSS = true;
	}
}

Thanks, it worked, but now it appeared another error but now it’s in build.cs and the target.cs, kkkkkkkkk .-. Error CS0103, the same error in both:

target.cs

Projects \ MyGamer \ Source \ MyGamer.Target.cs (12,9): error CS0103: The name ‘UEBuildConfiguration’ does not exist in the current MyGamer context C: \ Users \ Soneca \ Documents \ Unreal Projects \ MyGamer \ Intermediate \ ProjectFiles \ UnrealBuildTool 1

build.cs

C: \ Users \ Soneca \ Documents \ Unreal Projects \ MyGamer \ Source \ MyGamer \ MyGamer.Build.cs (20,17): error CS0103: The name ‘DynamicallyLoadedModulesNames’ does not exist in the current MyGamer context C: \ Users \ Documents \ Unreal Projects \ MyGamer \ Intermediate \ ProjectFiles \ UnrealBuildTool 1

target.cs code:

build.cs code:

I think you using an outdated tutorial. Try, to use bUsesSteam instead of UEBuildConfiguration.bCompileSteamOSS.

https://answers.unrealengine.com/questions/688348/steam-integration-overlay.html

In my multiplayer project I do:

Plugin

Set Online Subsystem Steam on Enabled

DefaultEngine.ini

[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection

;Set Steam as default platform
[OnlineSubsystem]
DefaultPlatformService=Steam
PollingIntervalInMs=20
VoiceNotificationDelta=0.2
[OnlineSubsystemSteam]
;Turn on OnlineSubsystemSteam
bEnabled=true
;Set ID app. ID 480 is for testing
SteamDevAppId=480
SteamAppId=480
bRelaunchInSteam=false
GameServerQueryPort=27015
bVACEnabled=1
GameVersion=1.0.0.0
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"

Build.cs

and add in constructors this:

PublicDependencyModuleNames.AddRange(new string[] {
    "OnlineSubsystem",
    "OnlineSubsystemUtils"
});

thanks, it worked