playMaker

Author Topic: PUN 2 - Getting number of Players in room error  (Read 351 times)

heavygunner

  • Sr. Member
  • ****
  • Posts: 340
    • View Profile
PUN 2 - Getting number of Players in room error
« on: October 28, 2020, 01:32:35 PM »
Hello !

I wanted to get number of players in the room. I used PUN get room properties action and saved the Players count. It worked. But, console showing an error.

My Unity 2019.3.15f1

Error :
Code: [Select]
NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMaker.FsmArray.SaveChanges () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmVariables/FsmArray.cs:341)
HutongGames.PlayMaker.FsmArray.set_Values (System.Object[] value) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmVariables/FsmArray.cs:153)
HutongGames.PlayMaker.Pun2.Actions.PunGetRoomProperties.getRoomProperties () (at Assets/PlayMaker PUN 2/Actions/PunGetRoomProperties.cs:145)
HutongGames.PlayMaker.Pun2.Actions.PunGetRoomProperties.OnEnter () (at Assets/PlayMaker PUN 2/Actions/PunGetRoomProperties.cs:103)
HutongGames.PlayMaker.FsmState.ActivateActions (System.Int32 startIndex) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:205)
HutongGames.PlayMaker.FsmState.OnEnter () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:175)
HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2771)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2718)
HutongGames.PlayMaker.Fsm.UpdateStateChanges () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2643)
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2787)
HutongGames.PlayMaker.Fsm.Update () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1995)
PlayMakerFSM.Update () (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:594)

heavygunner

  • Sr. Member
  • ****
  • Posts: 340
    • View Profile
Re: PUN 2 - Getting number of Players in room error
« Reply #1 on: October 29, 2020, 12:24:12 PM »
I added second action to get players count. It is not even working. Showing 0.
Get Room properties working. But, displaying above error