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.
Pages: 1
var client = PlayerIO.QuickConnect.SimpleConnect("everybody-edits-su9rn58o40itdbnw69plyw", "Email", "Password", null);
var connection = client.Multiplayer.JoinRoom("WorldID", null);
connection.OnDisconnect += (s, m) => Console.WriteLine(m);
connection.OnMessage += (s, m) => {
if (m.Type == "init") {
connection.Send("say", "hello");
connection.Send("init2");
}
Console.WriteLine(m);
};
connection.Send("init");
Thread.Sleep(-1);
I like it, as it is very light and does not require much time. It's very easy to use because all you need to do is write your data in a specific section.
Offline
Is this a tutorial or help topic?
There is no error checking for connection or client. And instead of "if (m.Type == "init")" you could use switches instead.
Also "connection.OnDisconnect += (s, m) => Console.WriteLine(m);" need braces.
Offline
Pages: 1
[ Started around 1733250110.7842 - Generated in 0.025 seconds, 12 queries executed - Memory usage: 1.33 MiB (Peak: 1.42 MiB) ]