question

Jeremy Rigaud avatar image
Jeremy Rigaud asked

UE4 C++ GetUserData

Hi everyone

I'm currently working on the integration of PlayFab in UE4 c++
I have some trouble to GetUserData

so far, I can Login, get PlayerProfile, update player profile (very simple and example are enought)

All my logic is done in the game instance, to keep data persistant over the game session some few update call will be done to get new data pushjed by servers on playfab

here is my request to GetUserData :

PlayFab::ClientModels::FGetUserDataRequest request;


	playFabclient->GetUserData(request,
		PlayFab::UPlayFabClientAPI::FGetUserDataDelegate::CreateUObject(this, &UBTD_GameInstance::OnSuccess_GetPlayerData),
		PlayFab::FPlayFabErrorDelegate::CreateUObject(this, &UBTD_GameInstance::OnError)
	);

since I want all User Data I just use an empty request (current loged in PlayerId will be used)

and in my success callback i'm tring to "parse" data like this :

playerProfile.Level = FCString::Atoi(Result.Data["Level"].Value());

Exemple for Player level but this won't compile

error C2064: term does not evaluate to a function taking 0 arguments


There something I didn't get, but there is no such documentation for UE4 c++

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

·
Jeremy Rigaud avatar image
Jeremy Rigaud answered

Problem solved :

playerProfile.Level = FCString::Atoi(*Result.Data["Level"].Value);
10 |1200

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

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.