01-17-2013 02:37 AM
Hello Everyone;
I want to change the display/login of the user/player on the Scoreloop server and I used this code:
SC_User_h user = SC_Session_GetUser(session); SC_Error_t err = SC_User_SetLogin(user, "MyLogin"); err = SC_UserController_UpdateUser(userController);
but it did not change on the server, Although the err value is "0" which means OK.
Thank you in advance.
Solved! Go to Solution.
01-18-2013 02:21 PM
Hello @omarics,
Did you verify if the parameters are being passed correctly to Scoreloop's servers?
How are you changing the display/login for the user and what is being presented or fields on the client end?
Any updates on your progress?
01-21-2013 03:22 AM
Hello William,
thank you,
here is the scenario:
i call:
SC_Client_CreateUserController(app->client, &app->userController, RequestUserCompletionCallback, app);
then in RequestUserCompletionCallback i call:
RequestUserCompletionCallback(void *userData, SC_Error_t completionStatus) {
AppData_t *app = (AppData_t *) userData;
SC_Session_h session = SC_Client_GetSession(app->client);
SC_User_h user = SC_Session_GetUser(session);
SC_Error_t err = SC_User_SetLogin(user, "MyName");
err = SC_UserController_UpdateUser(app->userController); // err value is 0
SC_String_h login = SC_User_GetLogin(user);
qDebug() << " User's login:" << (login ? SC_String_GetData(login) : "<unknown>"); // prints "MyName"then when i go to the Scoreloop website in ' Score Management ' section i see the player name still ' Player 1234 '.
and the next time when i debug the application, and before the call of ' SC_User_SetLogin(user, "MyName") '
i found that the login still ' Player xxxx ' which is not updated on the server.
so please what you see?
01-23-2013 04:07 PM
02-26-2013 07:23 AM
Hello William;
When I called "SC_User_SetLogin" function inside the callback function it did not work, But when I called it in the same function that I requested the user from, then it works like this:
SC_Error_t rc = SC_Client_CreateUserController(client, userController, RequestUserCompletionCallback, app);
rc = SC_UserController_LoadUser(userController);
SC_User_h user = SC_UserController_GetUser(userController);
rc = SC_User_SetLogin(user, "my name");
rc = SC_UserController_UpdateUser(userController);
Anyway, I noticed that the application is connected to the Games app which is installed on the BlackBerry 10 device
which from there the user can update his profile and login name as will.