This repository has been archived by the owner on Jan 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Get status not working? #102
Comments
Before copy & pasting anything you see on the internet, be sure you understand what it does first. Read this article to understand more about async/await: https://anidiots.guide/other-guides/async-await. |
Still confused.. |
is rbx.getStatus not a async function? |
Yes and that's why you must use it inside an async function while awaiting
it.
…On Sat, Jun 9, 2018 at 14:57 OutlookG ***@***.***> wrote:
is rbx.getStatus not a async function?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#102 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMKxJK_ZOO6ruQvKj-AQouY-5vCLOOrNks5t7BqOgaJpZM4UfIgK>
.
|
The issue is not rbx.getStatus, it has nothing to do with whether rbx.getStatus is an async function. The function _using async/await_ has to be async.
… On Jun 9, 2018, at 12:15, suufi ***@***.***> wrote:
Yes and that's why you must use it inside an async function while awaiting
it.
On Sat, Jun 9, 2018 at 14:57 OutlookG ***@***.***> wrote:
> is rbx.getStatus not a async function?
>
> —
> You are receiving this because you commented.
>
>
> Reply to this email directly, view it on GitHub
> <#102 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AMKxJK_ZOO6ruQvKj-AQouY-5vCLOOrNks5t7BqOgaJpZM4UfIgK>
> .
>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
so I have to put it in a async function.. ohhhh ok. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
So I took the code from some other thread that was answered..
And it comes up with this error:
await is only valid in async function
const status = await rbx.getStatus(await rbx.getIdFromUsername(username));
The text was updated successfully, but these errors were encountered: