Thread: Rankings
View Single Post
  #2  
Old 06-14-2009, 06:31 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Use Novo's math-sort class:
http://forums.graalonline.com/forums...ad.php?t=74117

and the following code:

PHP Code:

function onCreated() {

  
// Join Sort Class
  
join("math-sort");

  
// Echo Before..
  
this.rankings = {{300player.account}, {245player.account}, {439player.account}};
  echo(
this.rankings);

  
// Declare compareTo method.
  
temp.func = function(sideAsideB)
  {
    return ( 
sideA[0] < sideB[0] );
  };

  
// Echo After
  
temp.sorted sortListthis.rankingstemp.func );
  echo( 
temp.sorted );

__________________
Quote:
Reply With Quote