Nonexistent function 'que_free' in base Sprite

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By aephemerial

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(’

I understood that something in the 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_once = false
	global_position += velocity.rotated(rotation) * speed * delta

func _on_VisibilityNotifier2D_screen_exited():
:bust_in_silhouette: Reply From: chrisme

Is this just a spelling issue? Your error message says “que_free”, which is “queue_free()” as shown in your code example.

enter image description here

aephemerial | 2023-01-22 08:37

I can also provide the script.

extends Sprite

var speed = 92

var velocity = Vector2()

func _process(delta):
	if Global.player != null:
		velocity = global_position.direction_to(Global.player.global_position)
	global_position += velocity * speed * delta

func _on_Hitbox_area_entered(area):
	if area.is_in_group("Enemy_damager"):
		modulate = Color.white

func _on_Stun_timer_timeout():
	modulate = Color("db506d")

aephemerial | 2023-01-22 08:42

Now I got another something that says breakpoint and it’s pointing to the line


aephemerial | 2023-01-22 08:43

Okai, I’ve managed to find the typo. It was in, line 23
initially it was que_free() and it should have been queue_Free()

aephemerial | 2023-01-22 09:05