Find node and get text from Line edit

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By siten0308

Hello,

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 Find_node, so i sorta have 2 problems, 1, since i cant find the node using get_node, and find node doesnt offer get_text, what else can i do?

:bust_in_silhouette: Reply From: siten0308

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,.