roblox-js icon indicating copy to clipboard operation
roblox-js copied to clipboard

GetRankInGroup "undefined"?

Open ghost opened this issue 6 years ago • 8 comments

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

ghost avatar Jun 10 '18 18:06 ghost

Is this my code or that the group functions have stopped working?

ghost avatar Jun 13 '18 00:06 ghost

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 .

suufi avatar Jun 13 '18 09:06 suufi

im using it like you said, I put it in a async function, but it did not work. It came out as "pending"

ghost avatar Jun 15 '18 23:06 ghost

Clearly not. Please join the discord and send your code in the correct channel.

If it is "pending" you aren't using them properly.

Neztore avatar Jun 16 '18 11:06 Neztore

can not find the link to join the discord server.

ghost avatar Jun 16 '18 18:06 ghost

The discord channel did not help out one bit. They were not willing to help and were very rude.

ghost avatar Jun 17 '18 19:06 ghost

Feel free to check out our project and assistance team at https://discord.0q0.eu/ ! Regards!

0q0-Team avatar Jul 06 '18 08:07 0q0-Team

Was able to fix it all by my self. Without the help of your discord or any of you.

ghost avatar Jul 22 '18 21:07 ghost