godotjs / javascript

Javascript binding for godotengine
https://godotjs.github.io/
MIT License
980 stars 82 forks source link

call_method: JavaScript Error not a function #121

Closed Terria-K closed 2 years ago

Terria-K commented 2 years ago

I can't seems to use any godot function in this latest version of this module (alpha15) My code was simply is this:

export default class SomeNode extends godot.Node2D {
// There is some code above here, but its not important

    _ready() {
        // Same thing happens with this.get_node('Sprite')
        this.sprite = this.$("Sprite");
        godot.print("hello world");
    }
}

And I get this error: image

Geequlim commented 2 years ago

@zw7u9tru Can you check this ? I didn't compile and test your code before merge.

antharuu commented 2 years ago

Same problem

zw7u9tru commented 2 years ago

@Terria028 @antharuu let me know if the current release works better for you!

antharuu commented 2 years ago

@Terria028 @antharuu let me know if the current release works better for you!

Oh, thank you, it's good now !

Terria-K commented 2 years ago

@Terria028 @antharuu let me know if the current release works better for you!

Yes, it is now fixed! Thank you, might close the issue now