0 votes

I wrote this code
But it put that there is an invalid set index "text"

func _process(delta):
$Vidas.text = str(Mundo.Vidas)
But it put that

in Engine by (23 points)

2 Answers

0 votes

invalid set index text.... and there must have been something else in that error. Like : on base null instance ??

If so, than Your node does not see $Vidas node, which means a path to it is incorrect , name is incorrect, or it is not a child of this calling node at all.

by (6,285 points)
0 votes

You need to specify what exactly is your error. This can mean a lot of things like this node don't have a text property or don't have a variable called text, or it doesn't even exists for some reason.

And it's a bad idea to change a name of a label on the _process function, this will be executed A LOT, for no reason.

by (108 points)
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 webmaster@godotengine.org with your username.