Adding the same value to a list multiple times?

The problem:
I'm working on a game that takes the points earned while playing and puts them into a high-score list, but when adding the value to the list, it adds it three times.
Another thing that I should add for clarification is that I want the scores to stay in the list, without having to stop and restart the program entirely.

Stuff that didn't work:
I tried adding the values to a secondary list, then adding only the first value of that secondary list back in, but then the same value is added two times.
When I cleared the list before adding the points to it, it did work/only add one value, but I cannot keep the values of previous playthroughs.

I suspect that the value is being added before I want it to, but there is no indication of where that could be in my code.


@v1999: You may want to create a link to your code, as follows:

  • Use the "Save as" option for saving your project from within the Snap! editor;
  • Select "Share" in the menu popping up;
  • Copy the URL of your project from within the Snap! editor;
  • Paste the URL into a reply within this Forum topic, or even as an edit of your original post.

Once you will have done this, Forum users can take a peek, and contribute (usually helpful) suggestions.

  1. Are you using clones?
  2. Are you broadcasting a msg to increase the score ?

If you respond yes to these 2 questions: probablly all your clones are increasing the score...

(we have to look at your code...)

Figured it out, thank you for the replies

Now at least you know how to share code :smile:
Was it the clones issue, as suggested by @loucheman ?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.