This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-06-20 12:27:00

Tbtemplex97
Scratcher
Registered: 2011-11-12
Posts: 100+

Leaderboard Score and User System help

WARNING COMPLICATED TOPIC

I Am warning people that the coding in this is quite complicated and you need to know what you are doing.

-------------------
Right, I Have made a large script that saves you onto a leaderboard database which links together the username and score

But!, I am having many problems with it, its very buggy and i don't know why, Ive gone over the programme time and time again... It will not work properly.

Here is a link
-------------------

Thanks ~Templex

Last edited by Tbtemplex97 (2012-06-20 12:27:18)


Online Status: http://blocks.scratchr.org/API.php?action=onlineStatus&user=Tbtemplex97
Darkspace Coming Soon!, Try the Singleplayer Demo

Offline

 

#2 2012-06-20 12:37:39

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: Leaderboard Score and User System help

Ok, you're massively overcomplicating it, use this:

when I receive [save score v]
add (join(join(username) [:]) (score)) to [highscores v]


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#3 2012-06-20 13:11:32

Tbtemplex97
Scratcher
Registered: 2011-11-12
Posts: 100+

Re: Leaderboard Score and User System help

zammer990 wrote:

Ok, you're massively overcomplicating it, use this:

when I receive [save score v]
add (join(join(username) [:]) (score)) to [highscores v]

I Made this so that in 2.0, people couldn't spam the leaderboards, infact 1 per person but the code also allows for updating and bumping so that it is even and neat and in the correct place, your code would mess things up


Online Status: http://blocks.scratchr.org/API.php?action=onlineStatus&user=Tbtemplex97
Darkspace Coming Soon!, Try the Singleplayer Demo

Offline

 

#4 2012-06-20 13:36:33

skippito
Scratcher
Registered: 2012-03-17
Posts: 100+

Re: Leaderboard Score and User System help

You are making this way to complicated. Try this:

when I receive [Save Score v]
if <not <[Highscores v] contains (Username)>>
  add (join (Username) (join [ : ] (Score))) to  [Highscores v]
end

Offline

 

#5 2012-06-20 14:14:49

Prestige
Scratcher
Registered: 2008-12-15
Posts: 100+

Re: Leaderboard Score and User System help

Hey there! Not sure if this will help but this is a method I used to store usernames and scores, and display them in numerical descending order. To stop spamming in 2.0, you could try and add an encrypted password to the username - anyways here is the project  smile


"Don't insult someone until you've walked a mile in their shoes. That way, if they don't like what you have to say, you'll be a mile away and still have their shoes  smile  "

Offline

 

Board footer