0 votes


so I tried to assign a var variable with a line edit like this:

onready var username = get_node("Menu/Usercontainer/Username")

however get error "cannot find node username" so i try the next thing:

onready var username = find_node('username', false, false)

so, now i want to get the text from the username node, which is a line edit for the user to enter username, HOWEVER, i tried, and it doesnt work or doesnt have that property because its probably using Findnode, so i sorta have 2 problems, 1, since i cant find the node using getnode, and find node doesnt offer get_text, what else can i do?

in Engine by (64 points)

1 Answer

0 votes

k, after painful testing, this worked for me:

onready var http : HTTPRequest = $"/root/RegisterScreen/HTTPRequest" 
onready var Username : LineEdit = $"/root/RegisterScreen/Menu/UserContainer/VBoxContainer/Username"

hope this helps others,.

by (64 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 [email protected] with your username.