Your Godot version:
3.2.2
Issue description:
Too few arguments for "Connect()" call Expected at least 3
(Line 4 of gd script version)
URL to the documentation page:
https://docs.godotengine.org/en/stable/getting_started/step_by_step/scripting.html
I believe the correct line is :
get_node("Button").connect("pressed", self, "_on_Button_pressed")
https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-connect
In MACOS version 3.2.2 stable this code is what works.
func _ready():
get_node("Button").connect("pressed",self,"_on_Button_pressed")
I believe the correct line is :
get_node("Button").connect("pressed", self, "_on_Button_pressed")https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-connect
You're right. That's what works for me too.
Yes that's 4.0 changes which I must have merged by mistake in the 3.2 branch.
Yes that's 4.0 changes which I must have merged by mistake in the 3.2 branch.
Mistakes happen. The software and the documentation are excellent. Keep up the good work.
Fixed by ef45052cae16216cf728b76cdf71047ba0372c40, thanks for the report!
The error is still in the Scripting docs. By saying "Fixed" what did you mean?
@ZedMcJack The fix was merged in the 3.2/stable branch. It's not relevant for the master/latest branch of the documentation as the syntax for connecting signals is changing in 4.0.
Yes, you should consult https://docs.godotengine.org/en/3.2 or https://docs.godotengine.org/en/stable if you use Godot 3.2.x, not the latest branch (4.0).
Yes, you should consult https://docs.godotengine.org/en/3.2 or https://docs.godotengine.org/en/stable if you use Godot 3.2.x, not the
latestbranch (4.0).
Ok, I see now that there is actually a couple of documentations in Godot, I dont even know how I started learning from latest instead of stable branch
Most helpful comment
I believe the correct line is :
get_node("Button").connect("pressed", self, "_on_Button_pressed")
https://docs.godotengine.org/en/stable/classes/class_object.html#class-object-method-connect