I have an azure function i currently run manually from playfab (below code) via execture task on the segment of all players. The function sets a statistic value and some user data. The function seems to run fine and updates the all of the players, however, I get the same error twice (apparently for two different accounts).
Here are the errors: 2023 - 03 - 18T19: 49:34Z[Warning] User not found 1 - 641615cd - 0c27c0257f2be4d73dc7c655 2023 - 03 - 18T19: 49:34Z[Warning] master_player_account 16822171537723680430 not found in namespace 6DE4A01802FE9180 1-641615cd-4ec7dde077785a546315d609 2023-03-18T19:49:34Z[Warning] User not found 1-641615ce-4ea1c44057128b3d3f14b483 2023-03-18T19:49:35Z[Warning] master_player_account 13290559924692377474 not found in namespace 6DE4A01802FE9180 1-641615ce-58fb2d6c50b2d337344026f5
I was thinking that somehow there is a master account being accessed that does not have an account on the title, but I'm not sure. The account numbers its listing are 20 digit and so far as I know the playfab ids are 16 characters. Any help would be much appreciated.
[FunctionName("ResetPlayerPuzzleData")]
public static async Task ResetPlayerPuzzleData(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
var context = JsonConvert.DeserializeObject<PlayerPlayStreamFunctionExecutionContext>(await req.ReadAsStringAsync());
var puzzleScoreUpdate = new StatisticUpdate
{
StatisticName = PlayfabServerKeys.DailyPuzzle,
Value = 0
};
var updatePuzzleScoreReq = new UpdatePlayerStatisticsRequest
{
ForceUpdate = true,
PlayFabId = context.PlayerProfile.PlayerId,
Statistics = new List<StatisticUpdate> { puzzleScoreUpdate }
};
PlayFabResult<UpdatePlayerStatisticsResult> puzzleScoreResult = await PlayFabServerAPI.UpdatePlayerStatisticsAsync(updatePuzzleScoreReq);
if (puzzleScoreResult.Error != null)
log.LogWarning(puzzleScoreResult.Error.GenerateErrorReport());
var updateDataDict = new Dictionary<string, string>
{
{ PlayfabServerKeys.PuzzleWordPlayed, ""}
};
var wordPlayedRequest = new UpdateUserDataRequest
{
Data = updateDataDict,
PlayFabId = context.PlayerProfile.PlayerId,
};
PlayFabResult<UpdateUserDataResult> updateWordResult = await PlayFabServerAPI.UpdateUserDataAsync(wordPlayedRequest);
if (updateWordResult.Error != null)
log.LogWarning(updateWordResult.Error.GenerateErrorReport());
}