question

Never Rage Dungeons and Dragons avatar image
Never Rage Dungeons and Dragons asked

My Clear Question: How Do I return and request Cloud Script ReadOnly/Internal Data?

//HOW DO I USE THIS CODE IN UNITY

public void GetUserReadOnlyData()
{
//PlayFabSerAPI request or using PlayFab.ServerModel  is not allowed and gives errorcloudscript.png
 
    PlayFabServerAPI.GetUserReadOnlyData(new GetUserDataRequest()
    {
        PlayFabId = "user PlayFabId here - obtained from any successul LoginResult",
    },
    result => {
        if(result.Data == null || !result.Data.ContainsKey("Sister")) Debug.Log("No Sister");
        else Debug.Log("Sister: "+result.Data["Sister"].Value);
    },
    error => {
        Debug.Log("Got error getting read-only user data:");
        Debug.Log(error.GenerateErrorReport());
    });
}

How Do I Request the Value of the ReadOnly Data to Apply it, even if I cant see it(idont want to see it) just apply it. For example, I set the player kill spree to 45 using cloud script, and its a readonly data in the PlayFab Manager...I want to show that 45 to the player...as his skill spree. How do I request that data?

10 |1200

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

Never Rage Dungeons and Dragons avatar image
Never Rage Dungeons and Dragons answered

Ok, the problem I was having is all gone. I was getting the 500 error because I was trying hard to make the client get data from cloudscript...which is obviously bad. Thanks everyone. This community rule

10 |1200

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

Never Rage Dungeons and Dragons avatar image
Never Rage Dungeons and Dragons answered

Thanks guys, no more help needed...thanks so much, I figured it out !

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.