GrumpyCarrot / Android_Play_Games_Services_ANE

Air Native Extension (Android) for Google Play Games
11 stars 5 forks source link

Found bugs, rebuild request #5

Open Mihail-Afanasiev opened 8 years ago

Mihail-Afanasiev commented 8 years ago

I've found at least two bugs with achievements API:

  1. I can't use "setStepsAchievement" function. I've researched your code and found that there is difference in naming at calling it in Achievements.as class: _context.call("setStepsAchivement", achievementId,numSteps); and mapping it in ExtensionContext.java: functionMap.put("setStepsAchievement", new SetStepsAchievementFunction()); Because of this I get an error that context doesn't have such method.
  2. IncrementAchievement() is not working. You has the following code: achievementId = arg1[0].getAsString(); numSteps = arg1[0].getAsInt(); As you can see you take element with 0 index twice. So the second parameter numSteps just has no sense.

Please can you please fix it and rebuild the ane? I'm not familiar with github and have no experience in building ane but anyway I will try to make it by myself. But if thi repo is alive and you'll make it faster than me, I'd be glad.

Thanks for ane anyway!

Mihail-Afanasiev commented 8 years ago

I've check it out and found the same problem in SetStepsAchievementFunction.java as in IncrementAchievementFunction.java. Double usage of 0-index argument.