Author Topic: Getting a return string of "null" on connect  (Read 1492 times)

PatSilverFox

  • Guest
Getting a return string of "null" on connect
« 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.  
« Last Edit: February 07, 2013, 05:40:27 PM by PatSilverFox »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,153
  • Toronto, Canada
    • View Profile
Re: Getting a return string of "null" on connect
« Reply #1 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.

PatSilverFox

  • Guest
Re: Getting a return string of "null" on connect
« Reply #2 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.