Error Codes
Callback Method Information
public void OnError(ChatErrorModel error) {}
ChatErrorModel Class Details
| Data Key | Description | Type |
|---|---|---|
| code | Error code | string |
| message | Error message | string |
Source Code
using UnityEngine;
using PlayNANOO.ChatServer;
using PlayNANOO.ChatServer.Models;
public class PlayNANOOChatExample : MonoBehaviour, IChatListener
{
ChatClient chatClient;
void Start()
{
chatClient = new ChatClient(this);
chatClient.Connect();
}
void Update()
{
if (chatClient != null)
{
chatClient.Service();
}
}
public void OnError(ChatErrorModel error)
{
Debug.Log(error.code);
Debug.Log(error.message);
}
}
Error Information
When server connection fails ErrorCode : 1000 ErrorMessage : NoConnectException
When game information does not match ErrorCode : 1001 ErrorMessage : NoGameServiceException
When user information does not exist ErrorCode : 1002 ErrorMessage : NoPlayerException
When not subscribed to a channel ErrorCode : 2000 ErrorMessage : NotSubscribeException
When a socket error occurs ErrorCode : 3000 ErrorMessage : NoSocketException
When the server connection limit is exceeded ErrorCode : 4000 ErrorMessage : MaxConnectionException