0 votes

I don't know if it's me or the engine, but when i try to create an Enet server it throws: Could not create Enet server.

https://imgur.com/a/i3fngux

https://imgur.com/a/22qd0Ub

Btw, i haven't used Imgur before, so i don't know if the images are there...

in Engine by (12 points)

The images work fine. :) And the code excerpt you provided in your second screenshot looks alright too! However, the errors indicate there still went something wrong. Note that create_server returns an error code, you should check it:

var peer = NetworkedMultiplayerENet.new()
var error = peer.create_server(272, 2)
if error: print("ERROR CODE: ", error)
get_tree().set_network_peer(peer)

It might help you (or us, if you post it here) to fix the problem.

Sorry, i am very late. It throws an ERRCANTCREATE code.

1 Answer

+1 vote

Port numbers below 1024 may require elevated permissions. 272 was used in the example code.

by (70 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 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.