Invalid set index 'text' (on base: 'null instance') with value of type 'String'

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

Hello, I was making a multiplayer game, I encountered this error, please help

device_ip_address.text = Network.ip_address

:bust_in_silhouette: Reply From: Inces

reference variable device_ip_address is incorrect, it doesn’t lead to any node. Very frequent beginner problem, if You introduce variable as var deviceaddress =get_node("something") or $Something, You need to be sure this something node exists at the moment this line of code is executed. If it is executed when project is initiated, You may need to precede var with onready keyword, to let nodes instantiate