I have a panel node as the root node, and there are a few child containers. I am designing a control configuration scene for my game.
In the script, I've initialized the node in the root's script as
onready var action_list = get_node("Column/Scrollable/ActionList");
for inp_act in input_profile.keys():
var line = action_list.add_input_line(inp_act, input_profile[inp_act]);
#the error drops here. It says:
#Invalid call. Nonexistent function 'add_input_line' in base 'Nil'.
Here, the Column has a few children other than Scrollable, Scrollable is a scroll container with a single child ActionList, and ActionList is an empty container. In it, there exists a function addinputline().
I've checked thoroughly whether there is a spelling error or something of the sort in the path, or if there is a whitespace I'm not aware of. When I re-typed the path for ActionList, the compiler even autocompleted the path and it still drops the same error.
I've also tried to make children of ActionList and then simply set their values, so that the ActionList isn't empty when I call it in the script. The same error still shows.
So, to sum it up, there is a Container as a child, and the path is correct to my knowledge, and yet it keeps saying that the variable is Nil.
If a container is empty, is it not detected in script by its path?