I have created a software that includes 6 games, they all have scores, the player's scores are saved to firebase. Currently I want to get each person's total score to save to firebase, to create a score ranking for players. But when the project runs, the score is still 0. How can I do it???
Remove that Make A list block from the GotTagList event. The returned value is your list.
Also, nothing will work in screen.initianalize because the taglist has not yet arrived into that global variable.
It's wrong.
Move the For Each loop from Rank.Initialize to the When account.Taglist event.
Why are you zeroing out everyone's score each time any one enters the Rank Screen?
I want when someone opens the ratings screen, the score will be updated
Oh, when I edited the code as you said, my code actually worked but gave all accounts 0 points
Code:
Result:
So don't go zeroing them out?
If the code like this
I don't get any change in firebase
You should create a separate "totalScores" tag in your firebase data, adding up the total score for a player in the app, and submitting that to their name in totalScores, each time their score changes in an individual game. Then all you have to do is return the totalScores tag to get your overall rankings for all players.
because you are Using globle Taikhoan list
on screen initialize that is empty...
use this when you got Taglist..
its better if you use loop to add values to
globle Taikhuan from Taglist value parameter or you can use value paramater directly..
Yes there is a problem.
Listen to advice