Forum QuickConnect SimpleRegister Error

Discussion and help relating to PlayerIO's QuickConnect feature, including Facebook Connect and Kongregate Connect.

SimpleRegister Error

Postby L4ckyFox » August 1st, 2013, 9:05 pm

Please! Help! 3:00'm already make out the error that occurs when you call. SimpleRegister()
Im using C# & NGUI in project. I hope you will understand.
source code:
Code: Select all
   public GameObject Name;
   public GameObject Password;
   public GameObject EMail;
   
   public void OnClick()
   {
      PlayerIO.UnityInit(this);
      /*
      PlayerIO.QuickConnect.SimpleRegister(
         Const.GameID,
         Name.GetComponent<UIInput>().text,
         Password.GetComponent<UIInput>().text,
         "ddd@dd.ru",//EMail.GetComponent<UIInput>().text,
         null, null, null, null,
         onRegisterSuccess, oneRegisterError);
         */
      PlayerIO.QuickConnect.SimpleRegister(
         "gameid",
         "ddd",
         "wdwd",
         "2ed@rr.ru",
         null,null,null,null,
         onRegisterSuccess, onRegisterError);
   }
   
   public void onRegisterSuccess(Client client)
   {
      Debug.Log("User connected to server");
      //client.BigDB.Load(Const.UsersTable, null, onCreateUserInDB);
      client.Multiplayer.CreateJoinRoom("test room","public",true,null,null, onRoomCreatingSuccess,null);
   }
   
   public void onRegisterError(PlayerIORegistrationError error)
   {
      Debug.Log("UserName error: " + error.UsernameError);
      Debug.Log("Password error: " + error.PasswordError);
      Debug.Log("EMail error: " + error.EmailError);
      Debug.Log("Error: " + error.Message);
   }
   private void onCreateUserInDB(DatabaseObject DBObject)
   {
      DBObject.Set("Name", Name.GetComponent<UIInput>().text);
      DBObject.Set("Password", Password.GetComponent<UIInput>().text);
      DBObject.Set("EMail", EMail.GetComponent<UIInput>().text);
      Debug.Log("User are added to db:" +
         Name.GetComponent<UIInput>().text +
         Password.GetComponent<UIInput>().text +
         EMail.GetComponent<UIInput>().text);
   }
   
   private void onMessageHandler(Message message)
   {
      Debug.Log(message.Type.ToString());
   }
   public void onRoomCreatingSuccess(Connection connection)
   {
      connection.Send("Hello World");
   }

here's the error:
Image
User avatar
L4ckyFox
 
Posts: 9
Joined: July 23rd, 2013, 1:28 pm
Location: Saint Petersburg

Re: SimpleRegister Error

Postby SmallJoker » August 7th, 2013, 12:19 pm

don't set empty strings to NULL, just use
Code: Select all
""
SmallJoker
 
Posts: 50
Joined: March 28th, 2012, 12:22 pm

Re: SimpleRegister Error

Postby L4ckyFox » August 11th, 2013, 4:48 pm

SmallJoker wrote:don't set empty strings to NULL, just use
Code: Select all
""

i set all null strings to form " ", without extradata, but all the same comes out the same error (
Code: Select all
Dictionary<string,string> dic = new Dictionary<string,string>();
      dic.Add("d","a");
      PlayerIO.QuickConnect.SimpleRegister(
         "gameid",
         "ddd",
         "wdwd",
         "2ed@rr.ru",
         "","",dic,"",
         onRegisterSuccess, onRegisterError);
User avatar
L4ckyFox
 
Posts: 9
Joined: July 23rd, 2013, 1:28 pm
Location: Saint Petersburg

Re: SimpleRegister Error

Postby jbrettob » August 11th, 2013, 6:26 pm

I am checking things out and I have some question:
- Does your users need to fill in captha? If so, than it might be a captha error.
- If not, there there's something else going on.

original:
Code: Select all
public void SimpleRegister(
   string gameId,
   string username,
   string password,
   string email,
   string captchaKey,
   string captchaValue,
   Dictionary<string, string> extraData,
   string partnerId,
   Callback<Client> successCallback,
   Callback<PlayerIORegistrationError> errorCallback
)


yours
Code: Select all
Dictionary<string,string> dic = new Dictionary<string,string>();
dic.Add("d","a");
PlayerIO.QuickConnect.SimpleRegister(
   "gameid", // game id
   "ddd", // username
   "wdwd", // password
   "2ed@rr.ru", // email
   null, // captha key
   null, // captha value
   dic, // extra data
   null, // partnerId
   onRegisterSuccess,
   onRegisterError
);


I assume you have the following error:
"PlayerIORegistrationError.CaptchaError"

http://playerio.com/documentation/reference/unity3d/playerioclient.quickconnect#SimpleGetCaptcha

In your onRegisterError, please check also on CapthaError:
Code: Select all
public void onRegisterError(PlayerIORegistrationError error)
{
   Debug.Log("UserName error: " + error.UsernameError);
   Debug.Log("Password error: " + error.PasswordError);
   Debug.Log("EMail error: " + error.EmailError);
   Debug.Log("Captha error: " + error.CaptchaError);
   Debug.Log("Error: " + error.Message);
}



I've just reproduced your error:
Image
Game Designer & Developer | Flash | AS3 | Unity3D | C#
w: jbrettob.com | blog: blog.jbrettob.com | @jbrettob
User avatar
jbrettob
 
Posts: 19
Joined: April 9th, 2012, 3:51 pm
Location: The Netherlands, Europe

Re: SimpleRegister Error

Postby L4ckyFox » August 22nd, 2013, 4:51 pm

Thank you. it helped. but how to download the captcha image in GIF format if the engine only supports PNG and JPG? whether it is possible to use a CAPTCHA?
User avatar
L4ckyFox
 
Posts: 9
Joined: July 23rd, 2013, 1:28 pm
Location: Saint Petersburg

Re: SimpleRegister Error

Postby blitzen » November 26th, 2013, 10:48 am

L4ckyFox wrote:whether it is possible to use a CAPTCHA?


Apparently not directly. As you've observed, the Player.IO staff becomes oddly silent in response to this question.

I have recently made progress in getting the GIF converted to a usable PNG on the Unity desktop build with the folks on that forum.

For the web player, however, I'm still trying to figure out a solution.
blitzen
 
Posts: 12
Joined: February 6th, 2013, 4:48 am


Return to QuickConnect



cron