Error when viewing the number of players in a room

Friends I use photon on construct 2

and i need to use expression Photon.RoomPlayerCount(13_room_names.SelectedText)

But I keep seeing the error


  • This will bed fixed in the next release.

    Switching to Counstruct3 is highly recommended.

  • I have a payment problem on construct 2.

    Why are you lying you didn't even try to correct errors on construct 2 what the hell.

    Kindly fix for ocnstruct 2 for you it's easy after all

  • On September 13, I sent you a fix for C2 in response to your email support request.

    I don't understand what you want to achieve here.

  • Fixing what? I just misunderstood you.

    If you fixed these flaws where can I download the plugin again

  • vadim
    vadim mod
    edited September 2022

    Here is the fixed addon.

    You can also fix it yourself: replace ret.set_int(r && r["playerCount"]); with ret.set_int(r && r["playerCount"] || 0); in runtime.js stored in photon.c2addon archive.

  • ilya45
    edited September 2022

    The error no longer appears. But the number of players in the room is not displayed. Constantly gives 0, although there are 3 players in the selected room

  • Is the client connected to the master server? Normally, the client disconnects from master before joining the room.

    Note that after joining the master and updating the rooms info, "On room list" event is called. Then each time the info changes, "On room list update" is called.

  • To begin with, I do not connect to the room in which I want to know the number of players. I'm trying to find out the number of players in a room without connecting to it.

    And most likely you already understood this.

    And I do not disconnect from the main server.

    The Photon.RoomPlayerCount(Name) function does not work correctly, or I incorrectly write the value there. Although I already threw you the code. Here is a video of how it works