List of nodes in a dictionary always returns null

Godot Version

Godot 4.1

Question

I am now to coding and godot so sorry if it is too basic…
I have several arrays of button nodes that placed in a dictionary.
for some reason, whenever I print de dictionary, the “values” always return as .
however, If i directly print the array, it prints the object correctlly.
Code bellow:

Print result

{ “C”: , “D”: , “E”: , “F”: , “G”: , “A”: , “B”: }

Thanks you in advance!

Initialization of the class variables marked with @onready happens after the other class variables are initialized. Mark the note_dict with @onready too and it may work.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.