# Maintaining Client-Server Version Numbers

**URL:** <https://forums.unrealengine.com/t/maintaining-client-server-version-numbers/388287>\
**Category:** Multiplayer & Networking\
**Tags:** Networking, client, Server, dedicated, unreal-engine, version, question\
**Created:** [March 18, 2017, 6:48am UTC](https://forums.unrealengine.com/t/maintaining-client-server-version-numbers/388287 "2017-03-18T06:48:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheMainStark](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/themainstark/32/1120943_2.png) [@TheMainStark](https://forums.unrealengine.com/u/TheMainStark)\
**Post date:** [March 18, 2017, 6:48am UTC](https://forums.unrealengine.com/t/maintaining-client-server-version-numbers/388287/1 "2017-03-18T06:48:53Z")

</div>

I am having trouble understanding how to properly develop separate Client and Server versions of a project. I know they need to be built by the same source - which to my knowledge has been done. My issue is that I will have some client blueprints or settings that will differ from the dedicated server. To name one, UI and login setup.

Perhaps I just have the wrong theoretical process to do this?

I have:

- Installed 4.15 Source
- Created two separate projects,  
near identical ThirdPerson blueprint maps.  
Named one project Client and the  
other project Server. I have placed  
them in the source directory so they  
both show up in the visual basics  
Solution Explorer.
- Followed through a tutorial to use  
UnrealFrontEnd to create a dedicate  
server for the ‘Server’ Project.
- Once all changes are made in UE4, I  
re-build the solution for the whole  
engine in Visual Basics. Than build  
solutions for each project  
individually. (I’ve also tried just re-building just the whole engine).

Some success:

- Since the ‘Server’ project has been  
packaged for both a client and  
dedicated server… I can open the  
dedicated server than use the  
“WindowsNoEditor” version to connect  
to the dedicated server. I can  
connect multiple windows and see  
every character moving around fine, so the  
dedicated server appears to be  
working properly.

I have this quote from one post that may be what I need or what I am looking for but I am predominantly a blueprint developer. What is the process to do this in as C++ task?

> _**You can handle the version checks on  
> your own binding the  
> IsNetworkCompatibleOverride delegate  
> of FNetworkVersion to you own handler.  
> You can also bind the  
> GetLocalNetworkVersionOverride  
> delegate of FNetworkVersion to use  
> your own version system, for instance  
> a simple int so that different version  
> can connect together.**_

The image below is my error when trying to connect my ‘Client’ project to my ‘Server’ dedicated server. (I hope that doesnt sound confusing):

 ![130648-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/5/2/a52463a0b0cbb0bc411e845b6a0150d31d18c3be.png)

---

<div class="post-metadata">

**Author:** ![Socke81](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/socke81/32/1194535_2.png) [@Socke81](https://forums.unrealengine.com/u/Socke81)\
**Post date:** [May 21, 2017, 10:17pm UTC](https://forums.unrealengine.com/t/maintaining-client-server-version-numbers/388287/2 "2017-05-21T22:17:49Z")

</div>

Create a C++ Class from Editor (Blueprint Library).

```
#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "NetworkVersion.h"
#include "MyGameBluePrintLib.generated.h"

/**
 * 
 */
UCLASS()
class MYGAME_API UMyGameBluePrintLib : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
	
public:
	UMyGameBluePrintLib();

private:
	/*
	Client can't connect to Server if this Number not fit.
	*/
	uint32 getServerClientSyncVersion();
	
	
};

```

```
#include "MyGame.h"
#include "MyGameBluePrintLib.h"

UMyGameBluePrintLib::UMyGameBluePrintLib() {

		FNetworkVersion::GetLocalNetworkVersionOverride.BindUObject(this, &UMyGameBluePrintLib::getServerClientSyncVersion);

}

uint32 UMyGameBluePrintLib::getServerClientSyncVersion() {
	return 123456;
}
```

---

<div class="post-metadata">

**Author:** ![TheMainStark](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/themainstark/32/1120943_2.png) [@TheMainStark](https://forums.unrealengine.com/u/TheMainStark)\
**Post date:** [May 22, 2017, 6:53pm UTC](https://forums.unrealengine.com/t/maintaining-client-server-version-numbers/388287/3 "2017-05-22T18:53:27Z")

</div>

Thanks a ton for this!!!

I tried briefly yesterday night but I couldnt get it to work. I am going to re-try tonight I may have modified some of my NetworkVersion files that are causing problems.

Does it matter what type of C++ class I make? I made a blank class but thinking about it now I should have done a blueprint class… I think?

---

<div class="post-metadata">

**Author:** ![TheMainStark](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/themainstark/32/1120943_2.png) [@TheMainStark](https://forums.unrealengine.com/u/TheMainStark)\
**Post date:** [May 23, 2017, 8:25am UTC](https://forums.unrealengine.com/t/maintaining-client-server-version-numbers/388287/4 "2017-05-23T08:25:36Z")

</div>

With a fresh source install and correctly choosing the C++ Class as a Blueprint Library Function it worked like a charm.

Exactly what I was looking for! Thank You!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_089a4978](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_089a4978](https://forums.unrealengine.com/u/anonymous_user_089a4978)\
**Post date:** [September 30, 2018, 11:29am UTC](https://forums.unrealengine.com/t/maintaining-client-server-version-numbers/388287/5 "2018-09-30T11:29:31Z")

</div>

Thank you very much Socke81! This saved me from compiling the whole engine just to fix version mismatch error.

---

<div class="post-metadata">

**Author:** ![mightyenigma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mightyenigma](https://forums.unrealengine.com/u/mightyenigma)\
**Post date:** [October 1, 2018, 5:43pm UTC](https://forums.unrealengine.com/t/maintaining-client-server-version-numbers/388287/6 "2018-10-01T17:43:32Z")

</div>

Hey everyone, this sounds like the problem I am having but I don’t know for sure.  
How do I tell if it’s the version number or something else which gives me the Session Not Found error when trying to connect my slightly-different version of the game for Android with the original version for PC (this worked in the past by the way, when they had the same project file. I had to separate them out because Android doesn’t support one of the non-essential plugins I used for some fun menu effects).

Here’s my post if any of you would be willing to look at it and give me a clue:

> **[Can I have two different games join the same session?](https://forums.unrealengine.com/questions/832014/can-i-have-two-different-games-join-the-same-sessi.html)**
>
> I have a game that used to work well with running the Android build of it (client) and joining a PC build of the same game (host). But now I can't build the game to Android, because I am using a plugin that can't work on Android (because of some Kiss...

---

<div class="post-metadata">

**Author:** ![mightyenigma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mightyenigma](https://forums.unrealengine.com/u/mightyenigma)\
**Post date:** [October 1, 2018, 5:46pm UTC](https://forums.unrealengine.com/t/maintaining-client-server-version-numbers/388287/7 "2018-10-01T17:46:47Z")

</div>

Nevermind it works! I just had to shut down my VPN I didn’t realize I had left running!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5f3cf05a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5f3cf05a](https://forums.unrealengine.com/u/anonymous_user_5f3cf05a)\
**Post date:** [May 26, 2020, 1:55pm UTC](https://forums.unrealengine.com/t/maintaining-client-server-version-numbers/388287/8 "2020-05-26T13:55:27Z")

</div>

Hi

Sorry for my silly question.  
I have a same problem like you. And trying to solve with this code.

So what do I need to do with this code? Do I need to call from my blueprint gamemode or something?  
Or this code already running from start like a “beginplay”?

---

<div class="post-metadata">

**Author:** ![Socke81](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/socke81/32/1194535_2.png) [@Socke81](https://forums.unrealengine.com/u/Socke81)\
**Post date:** [May 26, 2020, 2:14pm UTC](https://forums.unrealengine.com/t/maintaining-client-server-version-numbers/388287/9 "2020-05-26T14:14:26Z")

</div>

If the code still works (is three years old) then the version check in the engine is overwritten. When the engine makes a request, it does not use the normal one but the one from the code example. So always the version 123456.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5f3cf05a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5f3cf05a](https://forums.unrealengine.com/u/anonymous_user_5f3cf05a)\
**Post date:** [May 26, 2020, 7:55pm UTC](https://forums.unrealengine.com/t/maintaining-client-server-version-numbers/388287/10 "2020-05-26T19:55:50Z")

</div>

Hi TheMainShark ,

Sorry for my silly question, what did u do with that cpp code after this?  
did u call it in blueprint? or just leave it there, it will running automatically like begin play.
