JohnTube mod

About

Username
JohnTube
Joined
Visits
3,078
Last Active
Roles
Registered, Moderator
Points
370
Badges
16

Activity

  • doolangames
    Hai @JohnTube
    I have some problem here can you help me please i just learning photon server right now

    Iam try to send OpCustom like this

    public void OpTestRequest()
    {
    var parameter = new Dictionary();
    parameter.Add((byte)100, "Hello World");
    PhotonNetwork.networkingPeer.OpCustom(TexasOperationCode.TestRequest, parameter, true);
    }

    but error come like this

    Operation failed: OperationResponse 2: ReturnCode: -2 (Unknown operation code). Parameters: {} Server: MasterServer

    what should i do??
    July 22
  • wasifk308
    please help me
    Here when i create a room from first person , room is created and when second person comes it joins the room, but when third person comes it creates new room ,while it should join the same room because the room have maxplayer =10.
    As there is joinrandomroom() function , So , i have tested multiple times but still third person creates new room.
    void Start () {
    competePlayeScale = true;
    PhotonNetwork.JoinRandomRoom();
    }
    void OnPhotonRandomJoinFailed() {
    PhotonNetwork.CreateRoom (null, new RoomOptions{ MaxPlayers = 10 }, null);
    }
    void OnJoinedRoom() {
    if (PhotonNetwork.playerList.Length == 1) {MyPlayer = (GameObject)PhotonNetwork.Instantiate (prefabSamurai.name, spawnPoint[0],Quaternion.identity, 0);
    }
    if (PhotonNetwork.playerList.Length == 2) {
    MyPlayer = (GameObject)PhotonNetwork.Instantiate (prefabSamurai.name, spawnPoint[1], Quaternion.identity, 0);
    }
    if (PhotonNetwork.playerList.Length == 3
    {
    MyPlayer = (GameObject)PhotonNetwork.Instantiate (prefabSamurai.name, spawnP
    July 13
  • wasifk308
    please help me
    Here when i create a room from first person , room is created and when second person comes it joins the room, but when third person comes it creates new room ,while it should join the same room because the room have maxplayer =10.
    As there is joinrandomroom() function , So , i have tested multiple times but still third person creates new room.
    void Start () {
    competePlayeScale = true;
    PhotonNetwork.JoinRandomRoom();
    }
    void OnPhotonRandomJoinFailed() {
    PhotonNetwork.CreateRoom (null, new RoomOptions{ MaxPlayers = 10 }, null);
    }
    void OnJoinedRoom() {
    if (PhotonNetwork.playerList.Length == 1) {MyPlayer = (GameObject)PhotonNetwork.Instantiate (prefabSamurai.name, spawnPoint[0],Quaternion.identity, 0);
    }
    if (PhotonNetwork.playerList.Length == 2) {
    MyPlayer = (GameObject)PhotonNetwork.Instantiate (prefabSamurai.name, spawnPoint[1], Quaternion.identity, 0);
    }
    if (PhotonNetwork.playerList.Length == 3
    {
    MyPlayer = (GameObject)PhotonNetwork.Instantiate (prefabSamurai.name, spawnP
    July 13
  • wasifk308
    void OnPhotonRandomJoinFailed() {

    PhotonNetwork.CreateRoom (null, new RoomOptions{ MaxPlayers = 10 }, null);

    } void OnJoinedRoom() {

    if (PhotonNetwork.playerList.Length == 1) {

    MyPlayer = (GameObject)PhotonNetwork.Instantiate (prefabSamurai.name, spawnPoint[0],Quaternion.identity, 0);

    MyPlayer.transform.rotation = Quaternion.Euler (0f,180f, 0f);

    MyPlayer.transform.localScale = new Vector3 (15, 15, 15);

    }

    if (PhotonNetwork.playerList.Length == 2)

    {

    MyPlayer = (GameObject)PhotonNetwork.Instantiate (prefabSamurai.name, spawnPoint[1], Quaternion.identity, 0);

    MyPlayer.transform.rotation = Quaternion.Euler (0f,200f, 0f);

    MyPlayer.transform.localScale = new Vector3 (15, 15, 15);

    }

    if (PhotonNetwork.playerList.Length == 3)

    {

    MyPlayer = (GameObject)PhotonNetwork.Instantiate (prefabSamurai.name, spawnPoint[2], Quaternion.identity, 0);

    MyPlayer.transform.rotation = Quaternion.Euler (0, 200, 0);

    MyPlayer.transform.localScale = new Vector3 (15, 15, 15);

    } }
    July 13
  • JohnTube earned the 1000 Comments badge.
    You’re practically family.
    June 12