Hello
I keep getting this error when I try to update the character
... I am running through a loop...its strange all of them report errors with the below;
2021-12-11T20:45:18.702 [Information] characterdata 584C3160B7ED1A7A count: 3 2021-12-11T20:45:18.709 [Information] characterdata 584C3160B7ED1A7A character id: 6277C93C83CB8F61 health id: 5 2021-12-11T20:45:18.876 [Information] characterdata 584C3160B7ED1A7A result: {"Result":null,"CustomData":null,"Error":{"HttpCode":400,"HttpStatus":"BadRequest","Error":1030,"ErrorMessage":"UserisNotValid","ErrorDetails":null,"RequestId":"Failed to Enumerate RequestId. Exception message: Enumeration has not started. Call MoveNext.","RetryAfterSeconds":null}}
the foreach loop in the functions:
foreach( var keeper in playerKeepers) { log.LogInformation($"characterdata {context.CurrentPlayerId} character id: {keeper["keeperDetails"]["CharacterId"]} health id: {keeper["keeperData"]["Health"]}"); var characterData = keeper["keeperData"]; var data = new Dictionary<string,string>() { { "CharacterData", PlayFabSimpleJson.SerializeObject(characterData) } }; UpdateCharacterDataRequest updateDataRequest = new UpdateCharacterDataRequest { PlayFabId = context.CurrentPlayerId, CharacterId = keeper["keeperDetails"]["CharacterId"], Data = data, Permission = UserDataPermission.Public }; var result = await serverApi.UpdateCharacterReadOnlyDataAsync(updateDataRequest); log.LogInformation($"characterdata {context.CurrentPlayerId} result: {PlayFabSimpleJson.SerializeObject(result)}"); log.LogInformation($"characterdata {context.CurrentPlayerId} result: {result.Result.DataVersion}"); log.LogInformation($"characterdata {context.CurrentPlayerId} error: {result.Error.ErrorMessage}"); }
what is the userisnotvalid message indicating here?
called from unity - to the azure function - character read only permission is public - is it something to do with the currentplayerid and entity id deal ?