It keeps saying 0 session avalible

it compiles and works but it keeps showing 0 sessions found. i am using two versions of same game on one PC and launching them as standalone games is this the correct way to test sessions on multiplayer LAN games

void UGameInstance::Init()
{
    if (IOnlineSubsystem* SubSystem = IOnlineSubsystem::Get())
    {
        SessionInterface = SubSystem->GetSessionInterface();
        if (SessionInterface.IsValid())
        {    
            //bind delegates
            SessionInterface->OnCreateSessionCompleteDelegates.AddUObject(this, &UGameInstance::OnCreateSessionComplete);
            SessionInterface->OnFindSessionsCompleteDelegates.AddUObject(this, &UGameInstance::OnFindSessionComplete);
            SessionInterface->OnJoinSessionCompleteDelegates.AddUObject(this, &UGameInstance::OnJoinSessionComplete);
        }
    }
}

void UGameInstance::OnCreateSessionComplete(FName ServerName, bool Succeeded)
{
    UE_LOG(LogTemp, Warning, TEXT("OnCreateSessionComplete, Succeeded: %d"), Succeeded);
    if (Succeeded)
    {
        GetWorld()->ServerTravel("/Game/FirstPersonCPP/Maps/FirstPersonExampleMap?listen");
    }
}

void UGameInstance::OnFindSessionComplete(bool Succeeded)
{
    UE_LOG(LogTemp, Warning, TEXT("OnFindSessionComplete, Succeeded: %d"), Succeeded);
    if (Succeeded)
    {
        TArray<FOnlineSessionSearchResult> SearchResults = SessionSearch->SearchResults;

        UE_LOG(LogTemp, Warning, TEXT("SearchResults, Server Count: %d"), SearchResults.Num());

        if (SearchResults.Num())
        {
            UE_LOG(LogTemp, Warning, TEXT("Joining Server"));
            SessionInterface->JoinSession(0, "My Session", SearchResults[0]);
        }

    }
}

void UGameInstance::OnJoinSessionComplete(FName SessionName, EOnJoinSessionCompleteResult::Type Result)
{
    UE_LOG(LogTemp, Warning, TEXT("OnJoinSessionComplete"));
    if (APlayerController* PController = UGameplayStatics::GetPlayerController(GetWorld(), 0))
    {
        FString JoinAdress = "";
        SessionInterface->GetResolvedConnectString(SessionName, JoinAdress);
        if (JoinAdress != "")
        PController->ClientTravel(JoinAdress, ETravelType::TRAVEL_Absolute);
    }
}

void UGameInstance::CreateServer()
{
    UE_LOG(LogTemp, Warning, TEXT("CreateServer"));

    FOnlineSessionSettings SessionSettings;
    SessionSettings.bAllowJoinInProgress = true;
    SessionSettings.bIsDedicated = false;
    SessionSettings.bIsLANMatch = true;
    SessionSettings.bShouldAdvertise = true;
    SessionSettings.NumPrivateConnections = 5;
    SessionSettings.NumPublicConnections = 5;

    SessionInterface->CreateSession(0, FName("My Session"), SessionSettings);
}

void UGameInstance::JoinServer()
{
    UE_LOG(LogTemp, Warning, TEXT("JoinServer"));
    SessionSearch = MakeShareable(new FOnlineSessionSearch());
    SessionSearch->bIsLanQuery = true;
    SessionSearch->MaxSearchResults = 10000;
    SessionSearch->QuerySettings.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals);

    SessionInterface->FindSessions(0, SessionSearch.ToSharedRef());
}

I figured it out MY SELF!!! and to all the new developers this is how i fixed it.

follow this tutorial for more info about sessions

in your Build.cs put the following instead of what is in the video

using UnrealBuildTool;

public class YourGameName: ModuleRules
{
    public YourGameName(ReadOnlyTargetRules Target) : base(Target)
    {
	    PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "OnlineSubsystem", "OnlineSubsystemNull", "OnlineSubsystemUtils" });

        PrivateDependencyModuleNames.AddRange(new string[] { });

        PrivateDependencyModuleNames.Add("OnlineSubsystem");
        PrivateDependencyModuleNames.Add("OnlineSubsystemNull");
    }
}