![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Fupicat |
I have a scene called Jogo that has the main menu:
In the Jogo node, I have this script:
And in the Menu Principal (main menu) node, I have this script:
The function receives the “button pressed” signal from the play button and checks if the Jogo node exists. If it doesn’t, it displays an error message. If it does, it calls the “carregar_cena” function in the Jogo node.
But for some reason, when I do that, I get the following error:
Invalid type in function 'add_child' in base 'Node (GameManager.gd)'. Cannot convert argument 1 from Object to Object.
What does Godot mean by “Cannot convert argument 1 from Object to Object”? What am I doing wrong?