How to set Game leaderboard score to zero for each user using cutom code?

0 votes
ScoreBoardService scoreBoardService = sp.buildScoreBoardService(); GameService gameService = sp.buildGameService(); ArrayList games = gameService.getAllGames(); for(int i=0;i<games.size();i++) { Game game = games.get(i); for(int j = 0;j<game.getScoreList().size();j++) { String userName = game.getScoreList().get(j).getUserName(); scoreBoardService.saveUserScore(game.getName(),userName,0); } }
asked Jul 3 in Java by info (10 points)

1 Answer

0 votes



You can set the Game Leaderboard Score to zero for each user by using the Edit Score Value By ID API, in this api you have to pass the Score Value -1  to set the Leaderboard Score 0.

For getting more details please have a look into this link.

If you have any other queries please let us know.

We will be happy to help you.

answered Jul 4 by priyanka.singh (80 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on
Migrate from Parse to ShepHertz App42