Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing a list to connect & disconnect
    primarykey
    data
    text
    <p>Here we have the Connect(); function:</p> <pre><code>public static void Connect(string username, string password, string roomName, string roomType, string roomID, string roomPass, bool roomVisible) { Console.WriteLine("[Bot] Trying to login..."); PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", username, password, delegate(Client client) { Console.WriteLine("[Bot] Logged in. Trying to join the room..."); Dictionary&lt;string, string&gt; roomData = new Dictionary&lt;string, string&gt;(); Dictionary&lt;string, string&gt; joinData = new Dictionary&lt;string, string&gt;(); roomData.Add("editkey", roomPass); roomData.Add("name", roomName); joinData.Add("editkey", roomPass); try { con = client.Multiplayer.CreateJoinRoom(roomID, roomType, roomVisible, roomData, joinData); if (con.Connected) { con.Send("init"); con.Send("init2"); con.OnMessage += new MessageReceivedEventHandler(OnMessage); con.OnDisconnect += delegate(object sender, string reason) { Console.WriteLine("Disconnected, Error: " + reason); }; Console.WriteLine("[Bot] Joined the world."); } } catch (PlayerIOError error) { Console.WriteLine("Error: " + error); } }, delegate(PlayerIOError error) { Console.WriteLine("Error: " + error); }); } </code></pre> <p>The ultimate goal is to disconnect, and my friend tells me this can be done with the use of a list. I am not familiar with lists, nor do I know how to use them.</p> <p>What I am asking is to put this in 'List' form so that (I'm assuming...) we can use a 'Clear' method to possibly disconnect. Or maybe a 'Remove' method.</p> <p>But like I said, I'm not sure how to use Lists at all, so the Clear method might mean something completely different.</p> <p>Please ask if you need to know more about this function, I'll try to get back as soon as possible. But from the vague information I have about lists, you don't need to know every detail of the function.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload