No overload for method 'JoinRandomRoom' takes 0 arguments

Options
There are 3 errors in unity and they don't disappear no matter what I do.

Assets/Photon/PhotonUnityNetworking/UtilityScripts/Prototyping/ConnectAndJoinRandom.cs(59,27): error CS1501: No overload for method 'JoinRandomRoom' takes 0 arguments

Assets/Photon/PhotonUnityNetworking/UtilityScripts/Debugging/StatesGui.cs(164,35): error CS1501: No overload for method 'JoinRandomRoom' takes 0 arguments

Assets/Photon/PhotonUnityNetworking/UtilityScripts/Prototyping/ConnectAndJoinRandom.cs(65,27): error CS1501: No overload for method 'JoinRandomRoom' takes 0 arguments
I have made no changes to the ConnectAndJoinRandom.cs and StatesGui.cs files.

PhotonNetwork.JoinRandomRoom (); is called everywhere the error indicates.

Errors occurred after I wrote the following code in my script file.

PhotonNetwork.JoinRandomRoom (new ExitGames.Client.Photon.Hashtable () {{"DifficultyLevel", 1}}, 0);
Before writing this code, the project was executable without error.

Even if I comment out this code after an error, the error will not disappear.

How can I make the error go away?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @noprops,

    Thank you for choosing Photon!

    It looks like your imported PUN 2 is broken.
    I suggest you start from a fresh clean empty new project and import latest PUN 2.