# Dedicated server guide for 4.16 wrong in code

**URL:** <https://forums.unrealengine.com/t/dedicated-server-guide-for-4-16-wrong-in-code/400159>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [July 14, 2017, 10:35pm UTC](https://forums.unrealengine.com/t/dedicated-server-guide-for-4-16-wrong-in-code/400159 "2017-07-14T22:35:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![milkman\_penta](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@milkman\_penta](https://forums.unrealengine.com/u/milkman_penta)\
**Post date:** [July 14, 2017, 10:35pm UTC](https://forums.unrealengine.com/t/dedicated-server-guide-for-4-16-wrong-in-code/400159/1 "2017-07-14T22:35:47Z")

</div>

When making ShooterGameServer.Target.cs for the dedicated server, the given code for 4.16 is wrong  
This is what it says:  
// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.  
using UnrealBuildTool;  
using System.Collections.Generic;

```
public class ShooterGameTarget : TargetRules
{
   public ShooterGameTarget(TargetInfo Target) : base(Target)
   {
       Type = TargetType.Game;
       bUsesSteam = true;
       ExtraModuleNames.Add("ShooterGame");
    }

   //
   // TargetRules interface.
   //

           public override void SetupGlobalEnvironment
          (
           TargetInfo Target,
           ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration,
           ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration
           )
   {
       if (Target.Platform == UnrealTargetPlatform.PS4)
       {
           OutCPPEnvironmentConfiguration.Definitions.Add("GARLIC_HEAP_SIZE=(2600ULL * 1024 * 1024)");
           OutCPPEnvironmentConfiguration.Definitions.Add("ONION_HEAP_SIZE=(200ULL * 1024 * 1024)");
           OutCPPEnvironmentConfiguration.Definitions.Add("RESERVED_MEMORY_SIZE=(1ULL * 1024 * 1024)");
           OutCPPEnvironmentConfiguration.Definitions.Add("LIBC_MALLOC_SIZE=(32ULL * 1024 * 1024)");
           OutCPPEnvironmentConfiguration.Definitions.Add("LIBC_MALLOC_SIZE=(32ULL * 1024 * 1024)");
           //for a real game these could be behind a call to a virtual function defined in a partial class in a protected 
           folder also.
           OutCPPEnvironmentConfiguration.Definitions.Add("UE4_PROJECT_NPTITLEID=NPXX51358_00");
  OutCPPEnvironmentConfiguration.Definitions.Add("UE4_PROJECT_NPTITLESECRET=81ae213eafbc64777574955bf921c9be3c60a3bddef70c357d8fe49ad64e0d0402d2249de390174832c5e4098114c93c33705b597cfbe9b1153d58fe9fae1f0de1466daf18ef25d06122cff7c95bde07bc060109e20c865305692dfbf9d7b726460893c4abd86dc9e8fd6b5db7dca4ffd4eefcb1771baccd576109bea862d6d4");
       }
   }
}

```

Target type is wrong and should be  
Type = TargetType.Server;

This line has a line to much  
//for a real game these could be behind a call to a virtual function defined in a partial class in a protected  
folder also.

Just letting you guys know!

---

<div class="post-metadata">

**Author:** ![milkman\_penta](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@milkman\_penta](https://forums.unrealengine.com/u/milkman_penta)\
**Post date:** [July 14, 2017, 10:36pm UTC](https://forums.unrealengine.com/t/dedicated-server-guide-for-4-16-wrong-in-code/400159/2 "2017-07-14T22:36:09Z")

</div>

Sorry forgot to give the link!

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

---

<div class="post-metadata">

**Author:** ![milkman\_penta](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@milkman\_penta](https://forums.unrealengine.com/u/milkman_penta)\
**Post date:** [July 14, 2017, 11:30pm UTC](https://forums.unrealengine.com/t/dedicated-server-guide-for-4-16-wrong-in-code/400159/3 "2017-07-14T23:30:37Z")

</div>

And the shooter game target should be server target.

Example  
TestServerTarget

---

<div class="post-metadata">

**Author:** ![MasterChief\_UA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MasterChief\_UA](https://forums.unrealengine.com/u/MasterChief_UA)\
**Post date:** [July 16, 2017, 2:02pm UTC](https://forums.unrealengine.com/t/dedicated-server-guide-for-4-16-wrong-in-code/400159/4 "2017-07-16T14:02:44Z")

</div>

You are my hero, i was trying to figure out what’s wrong ! 🙂

---

<div class="post-metadata">

**Author:** ![milkman\_penta](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@milkman\_penta](https://forums.unrealengine.com/u/milkman_penta)\
**Post date:** [July 17, 2017, 11:54am UTC](https://forums.unrealengine.com/t/dedicated-server-guide-for-4-16-wrong-in-code/400159/5 "2017-07-17T11:54:21Z")

</div>

Update on code yet?
