I attach the cloud script which I am using to get Player Data(Title), and also the PlayStream output. Its returning []. But I have player data with key named PrivateKey with proper value in PlayerData. Dont know what I am doing wrong!
//PLAYSTREAM OUTPUT "EventName": "player_executed_cloudscript", "Source": "CloudScript", "FunctionName": "getdataa", "CloudScriptExecutionResult": { "FunctionName": "getdataa", "Revision": 51, "FunctionResult": "[]", "FunctionResultTooLarge": null, "Logs": [ { "Level": "Error", "Message": "Event notfound. Exiting...", "Data": null } ], "LogsTooLarge": null, "ExecutionTimeSeconds": 0.0260343, "ProcessorTimeSeconds": 0.002982, "MemoryConsumedBytes": 4360, "APIRequestsIssued": 1, "HttpRequestsIssued": 0, "Error": null },
//CLOUD SCRIPT handlers.getdataa = function (context) { var TitleDataRequest = {"Keys":["PrivateKey"]}; var TitleDataResponse = server.GetTitleData(TitleDataRequest); if(!TitleDataResponse.Data.hasOwnProperty("PrivateKey")) { log.error("Event notfound. Exiting..."); return JSON.stringify([]); } else { var PrivateKey = TitleDataResponse.Data.PrivateKey; return PrivateKey; } };