Thread: Sorting
View Single Post
  #13  
Old 11-21-2009, 07:40 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
I don't think you understand what's going on, when you use sortbyvalue, added comments to show what's going on.

PHP Code:
public function getTopAbyss(){ 
  
// Initialize Array
  
temp.guildzname getGuildList();  
  
// Loop through Array 
  
for (temp.gtemp.guildzname) { 
    
// You have to assign the kills to the member in the array 
    
temp.g.kills this.guilds.(@temp.g).kills;   
  }
  
// Then you sort.
  
temp.guildzname.sortbyvalue("kills"nullfalse);
  
// Now you do stuff..
  // temp.guildzname[0] would be the guild name with the most kills, and so on.   

__________________
Quote:
Reply With Quote