Failed parsing address
When I try and connect to a server, (this is only a test project, and I am making the lobby) I get this
My script looks like this, right now:
Please help if you can! I really need to fix this error!
error; Failed parsing address.
The full error is: Failed parsing address:
UnityEngine.Debug:LogError(Object)
Photon.Realtime.LoadBalancingClient:DebugReturn(DebugLevel, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2057)
ExitGames.Client.Photon.IPhotonSocket:Connect()
ExitGames.Client.Photon.SocketUdp:Connect()
ExitGames.Client.Photon.EnetPeer:Connect(String, String, Object)
ExitGames.Client.Photon.PhotonPeer:Connect(String, String, Object)
Photon.Realtime.LoadBalancingClient:Connect() (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:724)
Photon.Pun.PhotonNetwork:ConnectToMaster(String, Int32, String) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:1184)
Photon.Pun.PhotonNetwork:ConnectUsingSettings() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:1116)
Com.MyCompany.MyGame.Launcher:Connect() (at Assets/Launcher.cs:43)
UnityEngine.EventSystems.EventSystem:Update()
The full error is: Failed parsing address:
UnityEngine.Debug:LogError(Object)
Photon.Realtime.LoadBalancingClient:DebugReturn(DebugLevel, String) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:2057)
ExitGames.Client.Photon.IPhotonSocket:Connect()
ExitGames.Client.Photon.SocketUdp:Connect()
ExitGames.Client.Photon.EnetPeer:Connect(String, String, Object)
ExitGames.Client.Photon.PhotonPeer:Connect(String, String, Object)
Photon.Realtime.LoadBalancingClient:Connect() (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:724)
Photon.Pun.PhotonNetwork:ConnectToMaster(String, Int32, String) (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:1184)
Photon.Pun.PhotonNetwork:ConnectUsingSettings() (at Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs:1116)
Com.MyCompany.MyGame.Launcher:Connect() (at Assets/Launcher.cs:43)
UnityEngine.EventSystems.EventSystem:Update()
My script looks like this, right now:
using System.Collections; using System.Collections.Generic; using UnityEngine; using Photon.Realtime; using Photon.Pun; namespace Com.MyCompany.MyGame { public class Launcher : MonoBehaviourPunCallbacks { string gameVersion = "1"; [SerializeField] private byte maxPlayersPerRoom = 4; [SerializeField] private GameObject controlPanel; [SerializeField] private GameObject progressLabel; void Awake() { PhotonNetwork.AutomaticallySyncScene = true; } void Start() { progressLabel.SetActive(false); controlPanel.SetActive(true); } void Update() { } public void Connect() { progressLabel.SetActive(true); controlPanel.SetActive(false); if (PhotonNetwork.IsConnected) { PhotonNetwork.JoinRandomRoom(); } else { PhotonNetwork.GameVersion = gameVersion; PhotonNetwork.ConnectUsingSettings(); } } //public void OnDisconnectedFromServer() //{ // progressLabel.SetActive(false); // controlPanel.SetActive(true); //} public override void OnConnectedToMaster() { Debug.Log("PUN Basics Tutorial/Launcher: OnConnectedToMaster() was called by PUN"); } public override void OnDisconnected(DisconnectCause cause) { progressLabel.SetActive(false); controlPanel.SetActive(true); Debug.LogWarningFormat("PUN Basics Tutorial/Launcher: OnDisconnected() was called by PUN with reason {0}", cause); } public override void OnJoinRandomFailed(short returnCode, string message) { Debug.Log("PUN Basics Tutorial/Launcher:OnJoinRandomFailed() was called by PUN. No random room available, so we create one.\nCalling: PhotonNetwork.CreateRoom"); PhotonNetwork.CreateRoom(null, new RoomOptions()); } public override void OnJoinedRoom() { Debug.Log("PUN Basics Tutorial/Launcher: OnJoinedRoom() called by PUN. Now this client is in a room."); } } }
Please help if you can! I really need to fix this error!
0
Comments
This discussion has been closed.