0 votes

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

device_ip_address.text = Network.ip_address

in Engine by (12 points)

1 Answer

+1 vote

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

by (7,285 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.