Photon Unity Networking Problem

Hello. I'm new to unity (I'm creating one of my first games :smile:). And i have a "problem".
My code is:

MenuGlowne (MainMenu)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class MenuGlowne : MonoBehaviour
{

    MenadzerPolaczen mp;
    public InputField ifNick;

    void Start()
    {
        DontDestroyOnLoad(gameObject);
        mp = GetComponent<MenadzerPolaczen>();
    }

    // Odpala mape gdy BtnGraj
    public void BtnGraj ()
    {
        if (ifNick.text.Length >= 4)
        {
            PhotonNetwork.playerName = ifNick.text;
            mp.Polacz();
        }

    }

}

Menadzer Polaczen (ConnectingMenager)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class MenadzerPolaczen : Photon.MonoBehaviour {

    void Update ()
    {
        if (Input.GetKeyDown(KeyCode.L))
        {
            Gracz.Debuguj();
        }
    }

    public void Polacz ()
    {
        PhotonNetwork.ConnectUsingSettings("EarlyAcces_June2019_ClosedAlpha_0.0.1");
    }

    void OnGUI ()
    {
        GUI.Label(new Rect(50, 30, 200, 20), PhotonNetwork.connectionStateDetailed.ToString());
    }

    void OnJoinedLobby()
    {
        SceneManager.LoadScene(1);
    }

    void OnPhotonRandomJoinFailed()
    {
        PhotonNetwork.CreateRoom(null);
    }

    void OnLevelWasLoaded(int level)
    {
        if (level != 0)
        {
            PhotonNetwork.JoinRandomRoom();
        }
    }

    void OnPhotonPlayerConnected(PhotonPlayer pp)
    {
        if (PhotonNetwork.isMasterClient)
        {
            photonView.RPC("GraczWszedl", PhotonTargets.AllBuffered, pp);
        }
    }

    void OnPhotonPlayerDisconnected (PhotonPlayer pp)
    {

    }

    [PunRPC]
    void GraczWszedl(PhotonPlayer pp)
    {
        Gracz gracz = new Gracz();
        Gracz.gracze.Add(gracz);
        gracz.nick = pp.NickName;
        gracz.pp = pp;
    }

    [PunRPC]
    void GraczWyszedl (PhotonPlayer pp)
    {

    }

    void OnCreatedRoom()
    {
        photonView.RPC("GraczWszedl", PhotonTargets.AllBuffered, PhotonNetwork.player);
    }
}

Gracz (Player)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Gracz {
    public string nick = "";
    public PhotonPlayer pp;

    public static List<Gracz> gracze = new List<Gracz>();

    public static void Debuguj()
    {
        Debug.Log("Game list debug! Player count: " + gracze.Count + "all players:: ");
            foreach (var gracz in gracze)
            {
                Debug.Log(gracz.nick + ", ");
            }
    }
}

All is nice, but when i get down BtnGraj (Button play) I see this in consle
https://zapodaj.net/61dabae5dd0ba.png.html

PS: Sorry for my English

Grasz = Player
Wszedl = Connected
Wyszedl = Disconnected
BtnGraj = Button Play

The error is on line 88 on MenadzerPolaczen, but i delated my comments in the script so now it’s line 74 in MenadzerPolaczen

You could fix this by not calling the RPC "GraczWszedl". Everyone else knows when a client joins, as there is a callback for that.
IInRoomCallbacks has OnPlayerEnteredRoom. Do the PUN Basics Tutorial.

So if I just delete RPC “GraczWszedl” it will work?

Ok, it work. I dont get the error, but the "player list" says 0 players.

https://cdn.discordapp.com/attachments/518387208873312285/593516304221077562/Przechwytywanie.PNG

Please read and code the Basics Tutorial.

I have the same error, do you already know how to fix it?