18
submitted 1 year ago* (last edited 1 year ago) by HobbesHK@startrek.website to c/godot@programming.dev

Hi everyone,

Pretty much as I described in my toot (text copied here). Is anyone aware of what I may need to fix to get this plugin to work again?

I'm hoping someone can help me with a Godot engine question. With the Q&A forum being read-only, I'm hoping Lemmy people can answer this one for me.

I'm trying to use this plugin for HTML5 downloads in Godot 4.1:

https://github.com/Pukkah/HTML5-File-Exchange-for-Godot

It's for Godot 3.4, but I've upgraded my projects and want to stay in 4.1.

Currently, it throws an error “Identifier JavaScript not defined in scope” (see screenshot).

Would anyone have an idea on what to fix here? Thanks!

top 3 comments
sorted by: hot top controversial new old
[-] Ategon@programming.dev 10 points 1 year ago

The JavaScript singleton no longer exists in Godot 4. Instead theres something called JavaScriptBridge. Docs about it here: https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_web.html#calling-javascript-from-script but havent used it before so cant give more than that

[-] HobbesHK@startrek.website 4 points 1 year ago

Thank you! I had a look through the documentation and managed to fix the error.

[-] Ategon@programming.dev 11 points 1 year ago

Nice, if you want you can also say how you solved it here in case someone stubles on this post in the future

this post was submitted on 10 Sep 2023
18 points (95.0% liked)

Godot

5935 readers
80 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

!roguelikedev@programming.dev

Credits

founded 1 year ago
MODERATORS