question

Nikolai Vorobev avatar image
Nikolai Vorobev asked

'AdminModels': is not a member of 'PlayFab'

Using Unreal Engine 4.5 along with PlayFab Marketplace Plugin

How to fix the error 'AdminModels': is not a member of 'PlayFab'

#include "AdminPlayFab.h"
#include "Core/PlayFabAdminAPI.h"


// Sets default values
AAdminPlayFab::AAdminPlayFab() { }


void AAdminPlayFab::GrantItemToUser(FString ItemID)
{
	adminAPI = IPlayFabModuleInterface::Get().GetAdminAPI();
	PlayFab::AdminModels::FGrantItemsToUsersRequest grantItemsToUsersRequest;
	adminAPI->SetDevSecretKey("IUKP78ON9P9EBJD3FCAFNFY9XDXKD71XQM4JUKW1MO7X1OOE66");


	adminAPI->GrantItemsToUsers(grantItemsToUsersRequest, PlayFab::UPlayFabAdminAPI::FGrantItemsToUsersDelegate::CreateUObject(this, &AAdminPlayFab::OnSuccess), PlayFab::FPlayFabErrorDelegate::CreateUObject(this, &AAdminPlayFab::OnError));
}


void AAdminPlayFab::OnSuccess(const PlayFab::AdminModels::FGrantItemsToUsersResult& Result) const
{


}


void AAdminPlayFab::OnError(const PlayFab::FPlayFabCppError& ErrorResult) const
{


}
#pragma once


#include "CoreMinimal.h"
#include "PlayFab.h"
#include "Core/PlayFabError.h"
#include "Core/PlayFabClientDataModels.h"
#include "GameFramework/Actor.h"
#include "AdminPlayFab.generated.h"


UCLASS()
class MYPROJECT_API AAdminPlayFab : public AActor
{
	GENERATED_BODY()
	
public:	
	AAdminPlayFab();


	void GrantItemToUser(FString ItemID);


	void OnSuccess(const PlayFab::AdminModels::FGrantItemsToUsersResult& Result) const;
	void OnError(const PlayFab::FPlayFabCppError& ErrorResult) const;


protected:
	PlayFabAdminPtr adminAPI;
};

unreal
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Nikolai Vorobev avatar image
Nikolai Vorobev answered

The issue is resolved

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Citrus Yan avatar image Citrus Yan commented ·

If you don't mind, could you please share what the root cause was and how you fixed it with the community?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.