Docs Master signals in error or confusion, GScript

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

confused. In master docs under custom signals comes the following:

func take_damage(amount):

var old_health = health

health -= amount

emit_signal(“health_changed”, old_health, health)

yet under the section on scene instancing

extends Sprite2D

signal shoot(bullet, direction, location)

var Bullet = preload(“res://Bullet.tscn”)

func _input(event):

if event is InputEventMouseButton:

if event.button_index == MOUSE_BUTTON_LEFT and event.pressed:

shoot.emit(Bullet, rotation, position)

Are they the same or different and why?

Even copying the example with Sprite2D and Timer fails. A bug?