playMaker

Author Topic: PlayMaker + Photon: CreateRoom Failed  (Read 2562 times)

JSChasle

  • Playmaker Newbie
  • *
  • Posts: 1
PlayMaker + Photon: CreateRoom Failed
« on: January 13, 2015, 03:30:07 PM »
Hi,

  I am trying to create a room using PlayMaker + Photon and I get this error:

CreateRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster.
UnityEngine.Debug:LogError(Object)
PhotonNetwork:CreateRoom(String, RoomOptions, TypedLobby) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1426)
HutongGames.PlayMaker.Actions.PhotonNetworkCreateRoom:OnEnter() (at Assets/Photon Unity Networking/PlayMaker/Actions/PhotonNetworkCreateRoom.cs:47)
HutongGames.PlayMaker.FsmState:ActivateActions(Int32)
HutongGames.PlayMaker.FsmState:OnEnter()
HutongGames.PlayMaker.Fsm:EnterState(FsmState)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState)
HutongGames.PlayMaker.Fsm:UpdateStateChanges()
HutongGames.PlayMaker.Fsm:DoTransition(FsmTransition, Boolean)
HutongGames.PlayMaker.Fsm:ProcessEvent(FsmEvent, FsmEventData)
HutongGames.PlayMaker.Fsm:Event(FsmEventTarget, FsmEvent)
HutongGames.PlayMaker.Fsm:Event(FsmEvent)
HutongGames.PlayMaker.Actions.GUILayoutButton:OnGUI() (at Assets/PlayMaker/Actions/GUILayoutButton.cs:45)
PlayMakerGUI:CallOnGUI(Fsm)
PlayMakerGUI:OnGUI()


I can't seem to find a solution. Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PlayMaker + Photon: CreateRoom Failed
« Reply #1 on: January 14, 2015, 03:16:04 AM »
Hi,

 It's because you haven't yet joined the lobby. Are in game already or is it just as you started the app?

you can not create a room if you are in a room or currently leaving or joining, you must be in the lobby. and so before you give photon an order to create a room you must make sure you are in the lobby by using the PHOTON / JOINED LOBBY event

Have you played with the PlayMaker/photon demo before working with photon?

 Bye,

 Jean