Attempt to call function 'connect' in base 'null instance' on a null instance.

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

I am following the tutorial from the godot.pdf and am stuck on page 47. The debugger says:

Attempt to call function ‘connect’ in base ‘null instance’ on a null instance.

I believe that means that the engine can’t find the node path but I’m not 100% sure on that.

:bust_in_silhouette: Reply From: kidscancode

That is typically what it means.

You didn’t provide much information (I don’t know what page 47 of the “godot.pdf” is), but you are either using get_node() with a node that doesn’t exist, or trying to create an instance of a nonexistent node.

I see what I did wrong. First off I meant to say that I was following along in the Godot docs > getting started > scripting continued > processing section in the step by step section that introduces scripting. One of the problems was that I had accidently created the button as a child of the label instead of the child of the panel. So when I went to use the GUI to connect the button to the pressed() signal, I chose the wrong path and the engine didn’t find what it needed.

Secondly, I had used the GUI to connect the pressed signal with the button control and THEN when into the panel script and connected the two again. Thus creating a debugger error that said I had preformed the connection twice needlessly.

Thanks for your help kidsscancode.

EurekaAlgorithm | 2018-04-02 18:55