On Connection callback got: False (error : <>) for uni

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

netstabber
Posts: 11
Joined: 06 Jan 2010, 09:55
Contact:

On Connection callback got: False (error : <>) for uni

Postby netstabber » 16 Dec 2010, 03:39

HI
MY SFS sometimes print
"On Connection callback got: False (error : <>)"

i don't know why ?In sfs1.6 I never have this error

In sfs2X when I use FPS DEMO sometime On Connection sometime false
if I edit new sence it always have this error
Now I Let my unity project 3.0 update 3.1 it have the error when 3.0 have true I can know why ?! please help me
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 16 Dec 2010, 06:37

If its true - then good!

If false, then your connection attempt failed.

Code: Select all

   public void OnConnection(BaseEvent evt) {
      bool success = (bool)evt.Params["success"];
      string error = (string)evt.Params["error"];
      
      Debug.Log("On Connection callback got: " + success + " (error : <" + error + ">)");


But there is a bug here - will be fixed in next release. the error parameter is not called "error", but "errorMessage". So try and repalce the above with

Code: Select all

   public void OnConnection(BaseEvent evt) {
      bool success = (bool)evt.Params["success"];
      string error = (string)evt.Params["errorMessage"];
      
      Debug.Log("On Connection callback got: " + success + " (error : <" + error + ">)");


and see what it writes

/Thomas

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 150 guests