ReferenceError: await is not defined

714 views
Skip to first unread message

陳冠榮

unread,
Jun 25, 2021, 9:58:47 PM6/25/21
to Glowscript Users
I try the 'Drag Example' in the Help:

scene.bind("click", def ():
    s = sphere(pos=scene.mouse.pos)
    scene.trigger("ball", newball=s)
)

scene.bind("ball", def (ev):
    ev.newball.color = color.blue
)

b = box()

while True:
    ss = scene.waitfor("ball")
    b.pos = ss.newball.pos + vec(0,-1, 0)

and got the following error message:
ReferenceError: await is not defined
At or near line 4: scene.trigger("ball", newball=s)

Do I miss something ?
Thanks.

Bruce Sherwood

unread,
Jun 25, 2021, 11:31:01 PM6/25/21
to Glowscript Users
There is indeed a bug in scene.trigger, which currently does not work.

Bruce

陳冠榮

unread,
Jun 26, 2021, 4:39:14 AM6/26/21
to glowscri...@googlegroups.com

Ok, I understood. Thanks!

 

Windows 10 郵件傳送

 

寄件者: Bruce Sherwood
傳送時間: 2021626 11:31
收件者: Glowscript Users
主旨: [glowscript-users] Re: ReferenceError: await is not defined

--

---
You received this message because you are subscribed to the Google Groups "Glowscript Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glowscript-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/glowscript-users/1ec29ffd-420a-49a2-9dae-3d0018181357n%40googlegroups.com.

 

Reply all
Reply to author
Forward
0 new messages