The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

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.

2 Answers

+1 vote

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

by (72 points)
0 votes

i think i understand your problem, this error occurs when you try to create a sever many times, only need to create it once, it's already created, if you want to create another one, you have to disconnect with the old one, otherwise it will show the above error, maybe your server is already created but you don't know, use a few commands to test it

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