0 votes

I am just starting to deal with godot and as a training I started making an analogue of a simple retro game. And in the process I ran into probably the most common problem for beginners Invalid get index 'position' (on base: 'null instance'). Studying similar problems, I understand that most likely I need to use the get_node function, but I do not quite understand how and where to use it in my particular case.
Link to the repository with the current code - - https://github.com/beliys/klad
The problem occurs on the next line - https://github.com/beliys/klad/blob/master/player.gd#L26
Thanks a lot for any help.

Godot version 3.3.2
in Engine by (17 points)

1 Answer

0 votes
Best answer

it means it can't find the node you're referencing, try to use autocomplete or copy the node path from the scene tab so you have a better idea where is the node you're trying to call.

by (449 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.