- Home /
Question by
dssanjay55555 · Dec 01, 2020 at 07:32 AM ·
scripting problemscript.scripting beginnernullreferenceexceptionnull
PlayFab CloudScript NullReferenceException
//I was trying to make Friend Request method using cloud scripts and SharedGroupData. I provided the all of my code below. Please help me find my mistake.
public void ReceiveFR()
{
FRObject.SetActive(false);
PlayFabClientAPI.ExecuteCloudScript(new ExecuteCloudScriptRequest()
{
FunctionName = "checkFriendRequests",
FunctionParameter = false,
GeneratePlayStreamEvent = true
}, OnReceiveFR =>
{
JsonObject jsonresult = (JsonObject)OnReceiveFR.FunctionResult;
object FRsender;
object message;
jsonresult.TryGetValue("message", out message); // This is the 278th line
FRmsg.text = message.ToString();
jsonresult.TryGetValue("FRsender", out FRsender);
rid = FRsender.ToString();
Debug.Log((string)FRsender);
}, DisplayPlayFabError);
}
screenshot-6.png
(111.7 kB)
screenshot-7.png
(31.6 kB)
Comment