Closed ytomasch closed 6 years ago
Are you using any events (onMessage, onShout, onJoinRequestHandle etc.)? This is not the type of error that would originate from the payout function.
For the sake of quick fixes, I wish I was.
Here is a simple snip of the code used:
rbx.login(group_owner_username,group_owner_password)
.then(function(){
rbx.getGeneralToken().then(function(){
rbx.groupPayout(group,username,amount)
.then(function(){
console.log("[Primary] Sent A Payout.");
});
});
});
Are you sure the error originates from roblox-js? Are you running anything else at all on the same script, even a discord server or something else?
Nope, I may contact the VPS for support to see if they are for some reason terminating the connection. It's a simple VPS server with only NodeJS hosting roblox-js server on 8080 - ubuntu 16
When you run the following what does it output?
rbx.login(group_owner_username, group_owner_password).then(rbx.getCurrentUser).then(console.log);
Here is the output, with username and last four of url replaced with X.
root@node-x:~# nodejs test-js-rbx.js
{ UserID: 295078431,
UserName: 'XXXXXXXX',
RobuxBalance: 0,
TicketsBalance: 0,
ThumbnailUrl: 'http://t7.rbxcdn.com/885259af170cf959ed40c1d60ce0XXXX',
IsAnyBuildersClubMember: true }
Nevermind now that I look more closely it has nothing to do with that, you are simply using the wrong arguments. rbx.groupPayout only takes user IDs, NOT usernames.
I am aware of this, the arguments sent to the code do use the ID, as it is still able to send payouts. Just crashes shortly after.
Why would it crash after all operations are done? Is that the full code?
If the payout executes successfully and completes and you have no other roblox-js functions this has nothing to do with the module and has to do with your personal setup which is not my concern.
I see, and believed this to be the case previously. Just wondered if I was missing something.
Thanks
[Primary] login complete. [Primary] Token Connected. [Primary] Sent A Payout. events.js:141 throw er; // Unhandled 'error' event ^
Error: read ECONNRESET at exports._errnoException (util.js:870:11) at TLSWrap.onread (net.js:544:26)