I have some server code which is giving me the error "Couldn't create ENet host". I'm not sure why since my code is the same as the example I was referencing. I think it was even working at an earlier point in the project.. How would I fix this?
The code for my ServerManager class includes the following:
var multiplayerPeer:ENetMultiplayerPeer = ENetMultiplayerPeer.new()
func start(port:int):
#Error thrown at this line
multiplayerPeer.create_server(port)
#This line says "Supplied MultiplayerPeer must be either Connecting or Connected"
multiplayer.multiplayer_peer = multiplayerPeer
multiplayer.peer_connected.connect(peer_connected)
multiplayer.peer_disconnected.connect(peer_disconnected)