–1 vote

Hello everyone,

I'm currently following a tutorial that show's how to create a simple game in Godot. It's nothing fancy - I just want to learn and understand better the engine and coding languages because I basically know nothing .

At the moment I seem to be stuck when hitting the enemy with a bullet, the game stops and the following error pops up.

Invalid call. Nonexistent function 'que_free' in base 'Sprite(Bullet.gd).'

I understood that something in the bullet.gd is off - cant figure what actually.

Here's the script:

extends Sprite

var velocity = Vector2(1,0)
var speed = 250

var look_once = true

func _process(delta):
    if look_once:
        look_at(get_global_mouse_position())
        look_once = false
    global_position += velocity.rotated(rotation) * speed * delta

func _on_VisibilityNotifier2D_screen_exited():
    queue_free()
Godot version v3.5.1
in Engine by (18 points)

1 Answer

+1 vote
Best answer

The error doesn't come from this script. There is misspelled function call somewhere else in your code. Make sure You are not running some other bullet code. There must be que_free instead of queue_free somewhere

by (8,099 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.