0 votes

I am making an LAN multiplayer game and trying to test out the API. I trying looking online, but I can't tell the issue. The connection doesn't seem to be opening. Here's the code:


extends Control
func onHostpressed():
var peer = NetworkedMultiplayerENet.new()
peer.create
server(3000, 10)
func onJoinpressed():
var peer = NetworkedMultiplayerENet.new()
peer.create
client($IP.text, 3000)
printdebug($IP.text)
get
tree().setnetworkpeer(peer)
sync func receiveMessage(id, text):
$Label.text = text
func onSendpressed():
rpc("recieveMessage", get
tree().getnetworkunique_id(), $ToSend.text)

And here's the tree:
Node tree
in Engine by (12 points)

Please log in or register to answer this question.

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 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 webmaster@godotengine.org with your username.