HELP: New to Go Dot - Simple Script/Signal Error

Godot Version

Version 4.2


Teacher here, new to GoDot, doing a tutorial on your website (link below).

The Script comes up with error message:

extends Panel

func _ready():
get_node(“Button”).connect(“pressed”, self, “_on_Button_pressed”)

func _on_Button_pressed():
get_node(“Label”).text = “HELLO!”

Error Message:
Line 4:Invalid argument for “connect()” function: argument 2 should be “Callable” but is “res://”.
Line 4:Cannot pass a value of type “String” as “int”.
Line 4:Invalid argument for “connect()” function: argument 3 should be “int” but is “String”.

Script is attached to Panel, the hierarchy is correct, on button pressed signal set up correctly.

Any ideas?

You are using a Godot 3 tutorial when you have Godot 4. Connecting signals works differently in Godot 4.

It’s like this:


Thank you so much, and for your quick reply!