Hi!
I think I am having a very similar problem. I am getting this message when starting the TeamSpeak's client:
Code:
libts3client.dll caused an Access Violation (0xc0000005)
in module libts3client.dll at 0033:a84a47d4.
This is my code:
Code:
public class VoiceChat : MonoBehaviour {
/* ********************* *
* ***** VARIABLES ***** *
* ********************* */
private static TeamSpeakClient ts3_client;
[SerializeField] private GameObject connectButton;
[SerializeField] private GameObject disconnectButton;
/* ************************* *
* ***** UNITY METHODS ***** *
* ************************* */
void Start ()
{
// Getting the TeamSpeak's client
ts3_client = TeamSpeakClient.GetInstance();
// Enabling logging
TeamSpeakClient.logErrors = true;
}
void Update ()
{
if (TeamSpeakClient.started == true)
{
connectButton.SetActive(false);
disconnectButton.SetActive(true);
}
else
{
connectButton.SetActive(true);
disconnectButton.SetActive(false);
}
}
/* ********************** *
* ***** UI METHODS ***** *
* ********************** */
public void Connect()
{
// HERE IS WHERE IT FAILS
ts3_client.StartClient(NetInfo.VoiceService.ip, (uint) NetInfo.VoiceService.port, NetInfo.VoiceService.secret, UserInfo.userName, ref NetInfo.VoiceService.defaultChannel, NetInfo.VoiceService.defaultChannelPassword); // HERE IS WHERE IT FAILS
}
public void Disconnect()
{
ts3_client.StopConnection("");
ts3_client.StopClient();
}
Also, the content of my "NetInfo" class is:
Code:
public class NetInfo : MonoBehaviour {
public const int DEFAULT_PORT = 7777;
public enum State { SERVER, HOST, CLIENT, OTHER };
public static State state = State.OTHER;
public static string ip = "127.0.0.1";
public static int port = DEFAULT_PORT;
public class VoiceService
{
public static string ip = "192.168.1.22"; // MY SERE
public static int port = 9987;
public static string secret = "MYSECRET";
public static string[] defaultChannel = new string[] { "default", "" };
public static string defaultChannelPassword = null;
}
}
And finaly, the "UserInfo" class:
Code:
public class UserInfo : MonoBehaviour
{
public static string userName = "Yo";
public static string token = "";
}