EvoEsports / gbxclient-node

Trackmania dedicated server xmlrpc client for nodejs
MIT License
7 stars 0 forks source link

Returning null when trying to connect #2

Closed Mawco closed 2 years ago

Mawco commented 2 years ago

Hey,

I'm having this weird issue where I can't connect to my server, the host is good and same for the port but when I start my script it just doesn't do anything, I tried adding a .then after and log the result and it just says false. here's a code sample

const { GbxClient } = require("@evotm/gbxclient");

const gbx = new GbxClient();

gbx.connect('blablabla', 5002).then(result => console.log(result));
gbx.call("SetApiVersion", "2013-04-16").then(result => console.log(result));
gbx.call("EnableCallbacks", true).then(result => console.log(result));

try {
    gbx.call("Authenticate", "SuperAdmin", "SuperAdmin").then(response => console.log(response));
} catch (e) {
    console.log("Authenticate to server failed.");
    process.exit(0);
}

// console output:
// false

Thank you for helping me :)

reaby commented 2 years ago

see readme.md for example how to use.

Mawco commented 2 years ago

Tried with the example too, same issue D:

reaby commented 2 years ago

Actually this is not even an issue, and I possible can't help you here. The library works as intented, you either do something wrong or your dedicated server is not setuped right. Try asking #community-support at https://discord.gg/trackmania

reaby commented 2 years ago

First version of the code executes the code in wrong order: kuva

You really have to use async/await to keep the order of executing right: kuva