Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: PatSilverFox on February 07, 2013, 05:36:52 PM

Title: Getting a return string of "null" on connect
Post by: PatSilverFox on February 07, 2013, 05:36:52 PM
Is there any common reason for
void OnNetworkConnect (bool success, string message)
to return null? It passes success as true but I am yet to get any connection between machines.
This has really been holding me up for a while, as i'm struggling to to get this to work. Any help would be appreciated.

I am trying to connect this way:

  1. TNManager.Connect (GameObject.Find ("IpAddress").GetComponent<TextMesh> ().text,5127);
  2.  

And I create a server this way:

  1. TNServerInstance.Start(5127, Random.Range(10000, 40000));
  2. TNServerInstance.discoveryPort=5129;
  3. TNManager.LoadLevel ("default");
  4.  
I also start udp on startup:


  1. TNManager.StartUDP(Random.Range(10000, 50000));
  2.  
Title: Re: Getting a return string of "null" on connect
Post by: ArenMook on February 07, 2013, 10:56:48 PM
Null string simply means there is no error. If 'success' is false, then 'message' will contain the reason why.
Title: Re: Getting a return string of "null" on connect
Post by: PatSilverFox on February 08, 2013, 08:37:07 AM
Thanks I wasn't sure if it was an error return or a success return, it seems to work now though thanks.