question

nikihin1997 avatar image
nikihin1997 asked

PlayFab create group playmaker action

Hello, I'm trying to create a group via Paymaker, but I can not do anything, I get an error.

Code:

#if !DISABLE_PLAYFABCLIENT_API && PVUE_PLAYMAKER_ENABLED && PLAYFAB_SDK_AVAILABLE_FOR_PVUE

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using PlayFab;
using PlayFab.GroupsModels;

namespace HutongGames.PlayMaker.Actions
{

[ActionCategory("PlayFab_Group")]
[Tooltip("Создание группы.клана")]
public class CreateGroup : FsmStateAction
{
        [ActionSection("Request Properties")]
        [RequiredField]
        [Tooltip("PlayFab name group")]
        public FsmString groupName;

        [RequiredField]
        [Tooltip("PlayFab entity.")]
        public FsmString entity;

        [ActionSection("Miscellaneous Properties")]
        [Tooltip("Gets the error string fired.")]
        public FsmString error;

        [Tooltip("Turn on the provide the debug info.")]
        public bool log;

        [Tooltip("Fire this event when a Login error is received.")]
        public FsmEvent errorEvent;

        public override void OnEnter()
        {


            CreateGroupRequest request = new CreateGroupRequest()
            {
                Entity = null,
                GroupName = groupName.Value
                

            };
            PlayFabGroupsAPI.CreateGroup(request, (result) =>
            {
                Finish();

            }, (errorCall) => {

                Debug.Log("PVUELog - " + errorCall.Error + "'!");

                error.Value = errorCall.Error.ToString();

                Fsm.Event(errorEvent);

            });
        }

}

}
#endif

Error:

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.WWW.FlattenedHeadersFrom (System.Collections.Generic.Dictionary`2 headers) (at C:/buildslave/unity/build/Runtime/Export/WWW.cs:98)
UnityEngine.WWW..ctor (System.String url, System.Byte[] postData, System.Collections.Generic.Dictionary`2 headers) (at C:/buildslave/unity/build/artifacts/generated/common/runtime/UtilsBindings.gen.cs:209)
PlayFab.Internal.PlayFabWww.MakeApiCall (System.Object reqContainerObj) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:108)
PlayFab.Internal.PlayFabHttp.MakeApiCall[CreateGroupResponse] (System.String apiEndpoint, PlayFab.SharedModels.PlayFabRequestCommon request, AuthType authType, System.Action`1 resultCallback, System.Action`1 errorCallback, System.Object customData, System.Collections.Generic.Dictionary`2 extraHeaders, Boolean allowQueueing) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabHTTP.cs:243)
PlayFab.PlayFabGroupsAPI.CreateGroup (PlayFab.GroupsModels.CreateGroupRequest request, System.Action`1 resultCallback, System.Action`1 errorCallback, System.Object customData, System.Collections.Generic.Dictionary`2 extraHeaders) (at Assets/PlayFabSdk/Groups/PlayFabGroupsAPI.cs:89)
HutongGames.PlayMaker.Actions.CreateGroup.OnEnter () (at Assets/JrDevAssets/PVUE - PlayFabVisualUnityExtensions/Playmaker Actions/Client/PlayFab_Group/CreateGroup.cs:58)
HutongGames.PlayMaker.FsmState.ActivateActions (Int32 startIndex) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:201)
HutongGames.PlayMaker.FsmState.OnEnter () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:169)
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2603)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2561)
HutongGames.PlayMaker.Fsm.UpdateStateChanges () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2489)
HutongGames.PlayMaker.Fsm.DoTransition (HutongGames.PlayMaker.FsmTransition transition, Boolean isGlobal) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2528)
HutongGames.PlayMaker.Fsm.ProcessEvent (HutongGames.PlayMaker.FsmEvent fsmEvent, HutongGames.PlayMaker.FsmEventData eventData) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2131)
HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, HutongGames.PlayMaker.FsmEvent fsmEvent) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2222)
HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEvent fsmEvent) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2303)
HutongGames.PlayMaker.Actions.uGuiButtonOnClickEvent.DoOnClick () (at Assets/PlayMaker Custom Actions/uGui/uGuiButtonOnClickEvent.cs:56)
UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:154)
UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:637)
UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) (at C:/buildslave/unity/build/Runtime/Export/UnityEvent.cs:773)
UnityEngine.Events.UnityEvent.Invoke () (at C:/buildslave/unity/build/Runtime/Export/UnityEvent_0.cs:52)
UnityEngine.UI.Button.Press () (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:35)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/UI/Core/Button.cs:44)
UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:50)
UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) (at C:/buildslave/unity/build/Extensions/guisystem/UnityEngine.UI/EventSystem/ExecuteEvents.cs:261)
UnityEngine.EventSystems.EventSystem:Update()

apisentities
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andy avatar image Andy ♦♦ commented ·

I'm chatting with the SDK team about this, but it may be a bug related to your config. Can you let me know how you're acquiring an entity token?

0 Likes 0 ·

0 Answers

·

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.