Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2019-03-01 17:54:35

skull111 forum
Member
Joined: 2017-07-01
Posts: 12

[Question] RoomType "public" doesn't exist

I don't know why, this never happened before.
I tried

con = client.Multiplayer.CreateJoinRoom("PWkbrKJ-ZhcUI", "public", true, new Dictionary<string, string>(), new Dictionary<string, string>());

but it didn't work.

I also tried

object version = client.BigDB.Load("config", "config")["version"];
con = client.Multiplayer.CreateJoinRoom("PWkbrKJ-ZhcUI", "Everybodyedits" + version, true, new Dictionary<string, string>(), new Dictionary<string, string>());

No exceptions, but it didn't connect to my world. (no extra clients opened)
What should I do now?


?type=location&name=skull111 ?type=online&name=skull111 ?type=energy&name=skull111 ?type=gems&name=skull111 ?type=loginstreak&name=skull111 ?type=lastlogin&name=skull111

I am trying to break the record. The last time I updated this signature is 37 days!

Offline

#2 2019-03-01 21:04:22

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: [Question] RoomType "public" doesn't exist

Are you sure you're doing everything else correctly? You also need to be sending init and init2 if you want to actually connect to the world.

Offline

#3 2019-03-01 21:30:26

XxAtillaxX
Member
Joined: 2015-11-28
Posts: 4,202

Re: [Question] RoomType "public" doesn't exist

I believe it's a little more complicated than that. I'll try to explain.

In essence, CreateJoinRoom is essentially a mix between CreateRoom and JoinRoom. If the room doesn't exist already, you need to specify the room type. If not, the server will tell you to join the first one it finds with the room ID you specify. If you look at the documentation, the JoinRoom request does not require a RoomType, however CreateRoom does. It is a fallback method.


signature.png
*u stinky*

Offline

Wooted by:

#4 2019-03-02 09:37:18

skull111 forum
Member
Joined: 2017-07-01
Posts: 12

Re: [Question] RoomType "public" doesn't exist

LukeM wrote:

Are you sure you're doing everything else correctly? You also need to be sending init and init2 if you want to actually connect to the world.

I put init2 and init in my code.
It should send init2 after init. I made a console app and made it so I can see if connected or not.

It connected, but it didn't send a message and didn't join as well.

XxAtillaxX wrote:

I believe it's a little more complicated than that. I'll try to explain.

In essence, CreateJoinRoom is essentially a mix between CreateRoom and JoinRoom. If the room doesn't exist already, you need to specify the room type. If not, the server will tell you to join the first one it finds with the room ID you specify. If you look at the documentation, the JoinRoom request does not require a RoomType, however CreateRoom does. It is a fallback method.

So if I use JoinRoom, and enter my world ID will it work?
I will give it a shot.


?type=location&name=skull111 ?type=online&name=skull111 ?type=energy&name=skull111 ?type=gems&name=skull111 ?type=loginstreak&name=skull111 ?type=lastlogin&name=skull111

I am trying to break the record. The last time I updated this signature is 37 days!

Offline

#5 2019-03-02 18:39:52

XxAtillaxX
Member
Joined: 2015-11-28
Posts: 4,202

Re: [Question] RoomType "public" doesn't exist

You should be able to join with CreateJoinRoom provided you specify the proper room type, which you have correctly shown in the first post; 'Everybodyeditts' + version

A few things to check off:
- are you able to join a world with the account using the flash client?
- is the account you're using a linked account?
- are you able to use another account to connect with the code you are using?

It would also help if you posted the full source code with the account details omitted.


signature.png
*u stinky*

Offline

#6 2019-03-09 10:47:20, last edited by skull111 forum (2019-03-09 10:52:09)

skull111 forum
Member
Joined: 2017-07-01
Posts: 12

Re: [Question] RoomType "public" doesn't exist

XxAtillaxX wrote:

You should be able to join with CreateJoinRoom provided you specify the proper room type, which you have correctly shown in the first post; 'Everybodyeditts' + version

A few things to check off:
- are you able to join a world with the account using the flash client?
- is the account you're using a linked account?
- are you able to use another account to connect with the code you are using?

It would also help if you posted the full source code with the account details omitted.

It's all in one file.
I've removed the unnecessary namespaces by the way.

Click to view the gist (C#)

Hidden text

------ EDIT ------

(  ) I've also tried with Everybodyedits + version thingy, it connected successfully but didn't join the world aswell.

(  ) I was trying it with my main account to join to MY world. And no, it didn't work out very well.

(  ) <silent>


?type=location&name=skull111 ?type=online&name=skull111 ?type=energy&name=skull111 ?type=gems&name=skull111 ?type=loginstreak&name=skull111 ?type=lastlogin&name=skull111

I am trying to break the record. The last time I updated this signature is 37 days!

Offline

#7 2019-03-09 21:20:58, last edited by XxAtillaxX (2019-03-09 21:21:54)

XxAtillaxX
Member
Joined: 2015-11-28
Posts: 4,202

Re: [Question] RoomType "public" doesn't exist

You have several issues with the code you posted.
You should try the following:

        static Client client { get; set; }
        static Connection con { get; set; }
        static void Main(string[] args)
        {
            client = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "email", "password", null);
            con = client.Multiplayer.CreateJoinRoom("world-id", "Everybodyedits" + client.BigDB.Load("config", "config")["version"], true, null, null);

            con.OnMessage += (s, e) =>
            {
                if (e.Type == "init")
                {
                    con.Send("init2");
                }

                if (e.Type == "say")
                {
                    if (e.GetString(1).StartsWith("!ping"))
                    {
                        con.Send("say", "/pm username message");
                    }
                }
            };

            con.Send("init");
            Console.ReadLine();
        }

signature.png
*u stinky*

Offline

Wooted by:

#8 2019-03-11 17:16:32

skull111 forum
Member
Joined: 2017-07-01
Posts: 12

Re: [Question] RoomType "public" doesn't exist

XxAtillaxX wrote:

You have several issues with the code you posted.
You should try the following:

        static Client client { get; set; }
        static Connection con { get; set; }
        static void Main(string[] args)
        {
            client = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "email", "password", null);
            con = client.Multiplayer.CreateJoinRoom("world-id", "Everybodyedits" + client.BigDB.Load("config", "config")["version"], true, null, null);

            con.OnMessage += (s, e) =>
            {
                if (e.Type == "init")
                {
                    con.Send("init2");
                }

                if (e.Type == "say")
                {
                    if (e.GetString(1).StartsWith("!ping"))
                    {
                        con.Send("say", "/pm username message");
                    }
                }
            };

            con.Send("init");
            Console.ReadLine();
        }

So, is CreateJoinRoom necessary? I connected with the JoinRoom.
Or I really need the lambda expression?
Connect and Client should be property?

If I missed the Connection and Client, that's okay but when I connect it, well, it doesn't even show up even after I sent "init2".

So I need to use CreateJoinRoom.

-----

Therefore, pretty ridiculous, it worked with other bots yet not with this bot.

I created a PlayerIO server myself, and I can't even either rename, or delete the "public" connection.
Perhaps only higher subscriptions lets you to do that?


?type=location&name=skull111 ?type=online&name=skull111 ?type=energy&name=skull111 ?type=gems&name=skull111 ?type=loginstreak&name=skull111 ?type=lastlogin&name=skull111

I am trying to break the record. The last time I updated this signature is 37 days!

Offline

#9 2019-03-11 17:40:21, last edited by LukeM (2019-03-11 17:41:04)

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: [Question] RoomType "public" doesn't exist

skull111 forum wrote:

CreateJoinRoom does two things, first it creates a room with the given room type if it doesn't exist already, and second it joins that room. This means that you don't need it if the room is already open (so giving it the wrong room type doesn't break anything as it doesn't use it), but if the room is closed then the create part is needed, and the room type matters.

And most of the code that Atilla changed doesn't need to be changed, I guess he just decided it looks nicer //forums.everybodyedits.com/img/smilies/tongue
The properties, inlining of version, lambda function, nulls instead of empty dictionaries, different way of handling commands, and alternate version of PM aren't needed, but the response to init and correct room types are.

Offline

LukeM1552322421742424

Board footer

Powered by FluxBB

[ Started around 1711637939.6053 - Generated in 0.069 seconds, 13 queries executed - Memory usage: 1.51 MiB (Peak: 1.67 MiB) ]