question

Jere Miles avatar image
Jere Miles asked

OnPlayFabError does not exist in the current context

Hello,

I must be overlooking something really obvious. I am getting an OnPlayFabError does not exist in the current context with the SetObjects code from the Entity Objects examples:

    
using PlayFab;
using PlayFab.ClientModels;
using PlayFab.DataModels;
using PlayFab.AuthenticationModels;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public void Store_Character(Player_Data playerData)
    {
        var data = new Dictionary<string, object>()
        {
            {"Health", 100},
            {"Mana", 10000}
        };
        var dataList = new List<SetObject>()
        {
            new SetObject()
            {
                ObjectName = "PlayerData",
                DataObject = data
            },
            // A free-tier customer may store up to 3 objects on each entity
        };
        PlayFabDataAPI.SetObjects(new SetObjectsRequest()
        {
            Entity = new PlayFab.DataModels.EntityKey { Id = entityID, Type = entityType }, // Saved from GetEntityToken, or a specified key created from a titlePlayerId, CharacterId, etc
            Objects = dataList,
        }, (setResult) => {
            Debug.Log(setResult.ProfileVersion);
        }, OnPlayFabError );  
    } 

I am sure that I am overlooking something really simple, just not seeing it. I am using C# within Unity. entityType and entityID are both set during the initial anonymous login that is working.

thank you

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

·
Jere Miles avatar image
Jere Miles answered

nevermind, was being silly on my part, forgot to create the OnPlayFabError method, all good now so go ahead and close this, sorry about that :)

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.