Hi. I am trying to save the user's score in unity3d. Here is my code
<code>
serviceAPI = new ServiceAPI ("","");
gameService = App42API.BuildGameService (); scoreBoardService = App42API.BuildScoreBoardService ();
scoreService = App42API.BuildScoreService ();
scoreBoardService.SaveUserScore (gameName,userName,score);
</code>
Do i have to include angle brackets <> while specifying the name & keys. I have tried both by including and excluding angle brackets<>.
Also, is it necessary to specify a callback when sumbitting the score, or is it optional?
scoreBoardService.SaveUserScore(gameName, userName, gameScore, new UnityCallBack());
I am getting the following error in XCode Console
apiKeybody{"app42":{"game":{"name":"BouncyBee","scores":{"score":{"value":2,"userName":"Manish"}}}}}timeStamp2014-07-29T10:31:13.303Zversion1.0
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)
QueryString is ?
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)
POST URI : https://api.shephertz.com/cloud/1.0/game/scoreboard?
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)
Error code: {0}Unauthorized
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)
{"app42Fault":{"httpErrorCode":401,"appErrorCode":1401,"message":"UnAuthorized Access","details":"Client is not authorized"}}
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)
appErrorCode 1401
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)
httpErrorCode 401
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)
App42SecurityException: {"app42Fault":{"httpErrorCode":401,"appErrorCode":1401,"message":"UnAuthorized Access","details":"Client is not authorized"}}
at com.shephertz.app42.paas.sdk.csharp.connection.RESTConnectorAsync.ExecutePost (System.String url, System.Collections.Generic.Dictionary`2 paramsDics, System.String bodyPayLoad, System.Collections.Generic.Dictionary`2 headerParams) [0x00000] in <filename unknown>:0
at com.shephertz.app42.paas.sdk.csharp.game.ScoreBoardService.SaveUserScore (System.String gameName, System.String gameUserName, Double gameScore) [0x00000] in <filename unknown>:0
at Leaderboard.SaveScore () [0x00000] in <filename unknown>:0
at ShowKeyboard.SaveScore () [0x00000] in <filename unknown>:0
at ShowKeyboard.SaveUsername () [0x00000] in <filename unknown>:0
at ShowKeyboard.Update () [0x00000] in <filename unknown>:0
(Filename: Line: -1)
Thanks