# Fail create session after add c++ class

**URL:** <https://forums.unrealengine.com/t/fail-create-session-after-add-c-class/39175>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [August 20, 2015, 8:38pm UTC](https://forums.unrealengine.com/t/fail-create-session-after-add-c-class/39175 "2015-08-20T20:38:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZkarmaKun](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zkarmakun/32/1194545_2.png) [@ZkarmaKun](https://forums.unrealengine.com/u/ZkarmaKun)\
**Post date:** [August 20, 2015, 8:38pm UTC](https://forums.unrealengine.com/t/fail-create-session-after-add-c-class/39175/1 "2015-08-20T20:38:48Z")

</div>

Hi forum here again with another existencial question

i made a little multiplayer game, just in blueprint,all works, my game session: find and joint sucessfully,but after add a simple class in order to solve the random (floats,int) in package game my game now is break.  
from other post i see is a bug, random functions dont work in package game 4.8.3 version, so i solve that with this simple class, but now i cant create session in package in editor keep working.

what can i do? i try delete OnlineSubsystem from my DefaultEngine.ini and re add again, cook and package again and dont work, im very sad

```auto

[OnlineSubsystem]
DefaultPlatformService=Null

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c3be8074](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c3be8074](https://forums.unrealengine.com/u/anonymous_user_c3be8074)\
**Post date:** [August 20, 2015, 8:45pm UTC](https://forums.unrealengine.com/t/fail-create-session-after-add-c-class/39175/2 "2015-08-20T20:45:06Z")

</div>

Can you post a stacktrace or log when it crashes? That would help determin what’s going wrong.

---

<div class="post-metadata">

**Author:** ![ZkarmaKun](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zkarmakun/32/1194545_2.png) [@ZkarmaKun](https://forums.unrealengine.com/u/ZkarmaKun)\
**Post date:** [August 20, 2015, 8:53pm UTC](https://forums.unrealengine.com/t/fail-create-session-after-add-c-class/39175/3 "2015-08-20T20:53:47Z")

</div>

sorry but my game is not crashing the session cant be created! just in package mode, in editor keep working, this happen after add my class and i dont know why or what is happen here

check this pic, in my package game my function always return on failure

 ![Test.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/e/3/ae3c7929a28569816d44609e8ecc026c4a310006.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c3be8074](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c3be8074](https://forums.unrealengine.com/u/anonymous_user_c3be8074)\
**Post date:** [August 20, 2015, 9:05pm UTC](https://forums.unrealengine.com/t/fail-create-session-after-add-c-class/39175/4 "2015-08-20T21:05:08Z")

</div>

As I already didn’t work with the online subsystem I might not give a correct answer. But perhaps this might help:

> **[Failed to Create Session](https://forums.unrealengine.com/questions/160568/failed-to-create-session.html)**
>
> Hi I tried to create an online session with the create session node. hooked up everything fine. on debugging ther error i found the error “net driver already exists” . can someone shed some light on this

> **[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 — https://unrealcommunity.wiki/! You will be able to find content from...

Sorry that I can’t help you more.

---

<div class="post-metadata">

**Author:** ![ZkarmaKun](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zkarmakun/32/1194545_2.png) [@ZkarmaKun](https://forums.unrealengine.com/u/ZkarmaKun)\
**Post date:** [August 20, 2015, 9:15pm UTC](https://forums.unrealengine.com/t/fail-create-session-after-add-c-class/39175/5 "2015-08-20T21:15:38Z")

</div>

Hell yeah dude!

seems when you work in blueprints, UE manages modules, so when i create my class the build.cs override that, so i add “OnlineSubsystem”, “OnlineSubsystemUtils” to my public modules and add “OnlineSubsystemNull” to my DynamicallyLoadedModuleNames and…

[attach=config]53447[/attach]
