# Can't get session settings

**URL:** <https://forums.unrealengine.com/t/cant-get-session-settings/440752>\
**Category:** C++\
**Tags:** online-subsystem-ove, sessions, unreal-engine, CPP, question\
**Created:** [January 6, 2019, 6:02pm UTC](https://forums.unrealengine.com/t/cant-get-session-settings/440752 "2019-01-06T18:02:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![YogevNa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YogevNa](https://forums.unrealengine.com/u/YogevNa)\
**Post date:** [January 6, 2019, 6:02pm UTC](https://forums.unrealengine.com/t/cant-get-session-settings/440752/1 "2019-01-06T18:02:47Z")

</div>

I’m trying to get the **Current** Session settings from the online subsystem.  
Get get it to work…

```
void UOnlineFunctionLibrary::GetSessionData(bool & IsValid)
{
	IOnlineSubsystem* Subsystem = IOnlineSubsystem::Get();
	if (Subsystem == nullptr)
	{
		IsValid = false;
		return;
	}
	IOnlineSessionPtr SessionInterface = Subsystem->GetSessionInterface();
	if (SessionInterface.IsValid())
	{
		FOnlineSessionSettings* CurrentSettings = SessionInterface->GetSessionSettings(GameSessionName);
		IsValid = true;
		return;
	}
	else
	{
		IsValid = false;
		return;
	}
}

```

When I try to compile this is what I get:

```
Error	C2027	use of undefined type 'IOnlineSession'

Error	C2039	'GetSessionSettings': is not a member of 'TSharedPtr<IOnlineSession,ESPMode::ThreadSafe>'	

```

How can I get the current (The session I’m connected to) Settings?

Thanks!

---

<div class="post-metadata">

**Author:** ![YogevNa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YogevNa](https://forums.unrealengine.com/u/YogevNa)\
**Post date:** [January 7, 2019, 12:08pm UTC](https://forums.unrealengine.com/t/cant-get-session-settings/440752/2 "2019-01-07T12:08:34Z")

</div>

Forgot to add `#include "Online.h"`
