Unable to get ".text" to work

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

Hi all,

can anyone help me as to why I can get the “.text” on the second line of code and not the first line of code?

get_node(str("BackGroundImage/VBoxContainer/MainBodyContainer/GridContainer/",ItemBuying,"VBoxContainer/MiddleContainer/HBoxContainer/Value"))
get_node("BackGroundImage/VBoxContainer/MainBodyContainer/GridContainer/Upgrade1/VBoxContainer/MiddleContainer/HBoxContainer/Value").text   

How I can get the “.text” to work on the first line of code.

any help is greatly appreciated.

:bust_in_silhouette: Reply From: timothybrentwood

It looks like you’re missing a / before VBoxContainer:

get_node(str("BackGroundImage/VBoxContainer/MainBodyContainer/GridContainer/", ItemBuying, "/VBoxContainer/MiddleContainer/HBoxContainer/Value"))

Thank you for the quick reply,

I knew it had to be something simple…

Just couldn’t see it for the life of me :smiley:

Thank you.

Manx191 | 2021-08-13 12:48