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
I noticed that Jesse in their unfavoriter code thing, they had 'PlayerIO.useSecureApiRequests = true;'
I would like to implement the same functionality in a JS bot of mine, but I get:
Authenticated
Loaded config
Determining joinRoom or createJoinRoom
Error: GeneralError: Could not establish a socket connection to any of the given endpoints for the room
In the JS debugger, each one has something along the lines of this:
Unable to connect to endpoint: gs47.playerio.com:27000. reason: "SecurityError: The operation is insecure.". No more endpoints to try.
What do I do?
Offline
IIRC there is also a second line you need to add in the connect callback, similar to the one you've already added.
Not sure if this is what would be causing the errors though
You appear to be right,
client.multiplayer.useSecureConnections = true;
This is what I've needed.
For future reference:
*PlayerIO.useSecureApiRequests = true;
global = {
client: null,
connection: null,
players: {}
}
function Start() {
var email = prompt("Email: ");
var password = prompt("Password: ");
var worldID = prompt("World ID: ");
PlayerIO.authenticate("everybody-edits-su9rn58o40itdbnw69plyw", "simpleUsers", { email: email, password: password }, {}, function(client) {
* client.multiplayer.useSecureConnections = true;
global.client = client;
Log("Authenticated");
...
Line 1 and 14 ( I used * to mark them )
Offline
Pages: 1
[ Started around 1732965437.7008 - Generated in 0.028 seconds, 12 queries executed - Memory usage: 1.4 MiB (Peak: 1.5 MiB) ]