roblox-js
roblox-js copied to clipboard
GetRankInGroup "undefined"?
Im trying to make a lvl up group system but it always errors:
Code:
async function returnrank(id) {
var able2 = true
try {
const rank = await Roblox.getRankInGroup(3576137,id)
}
catch(err) {
able2 = false
};
if(able2 == true) {
const rank = await Roblox.getRankInGroup(3576137,id)
.then(function (therank) {
return rank -- Error line
});
} else {
message.reply('you are not in the roblox group! Please join it to recive your rank!')
return null
};
}
Error:
(node:4) UnhandledPromiseRejectionWarning: ReferenceError: rank is not defined
Is this my code or that the group functions have stopped working?
Please use async/await properly. Don't open another issue that's not related to the library directly; use the ROBLOX API Discord Server instead.
On Tue, Jun 12, 2018 at 20:59 OutlookG [email protected] wrote:
Is this my code or that the group functions have stopped working?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sentanos/roblox-js/issues/104#issuecomment-396780345, or mute the thread https://github.com/notifications/unsubscribe-auth/AMKxJJvxbzde02wt5dkbmE6JvZIpyYh_ks5t8GPrgaJpZM4Uh1Dj .
im using it like you said, I put it in a async function, but it did not work. It came out as "pending"
Clearly not. Please join the discord and send your code in the correct channel.
If it is "pending" you aren't using them properly.
can not find the link to join the discord server.
The discord channel did not help out one bit. They were not willing to help and were very rude.
Feel free to check out our project and assistance team at https://discord.0q0.eu/ ! Regards!
Was able to fix it all by my self. Without the help of your discord or any of you.