ID:163568
 
How can i create a score board that says the max powerlevel, the level... of the players saved in the Save Files? , plz dont send a demo link cuz i already got all, and i cant.

PLZ answer
Before I'm "banned from BYOND for seven years", I might as well prove my point. This code snippet won't work unless you know what you are doing, but I assure you, it does work, so I'll give it to you just to bother the bejesus out of you.

You could have asked me to fine-tune it for your game, but after your attitude, I'd like to sit here and watch you scratch your head on this one for a few months.

Enjoy.

var
list/highscores = list()
hscorelen = 20
proc
addscore(var/name,var/pl)
if(highscores.Find(name))
highscores[name] = adding.pl
else
for(var/count=highscores.len,count>0,count--)
if(pl<highscores[highscores[count]]&&count<hscorelen)
highscores.Cut(count+1,count+2)
highscores.Insert(name,count+1)
highscores[name] = pl
return
scanfiles()
var/list/files = flist("/saves")
for(var/v in files)
var/savefile/F = file("/saves/[v]")
var/name << F["name"]
var/pl << F["pl"]
cmpscore(name,pl)
cmpscore(var/name,var/pl)
if(global.highscores.len<global.hscorelen||pl>global.highscores[global.highscores[global.highscores.len]])
global.addscore(name,pl)
mob
Login()
return ..()
spawn()
src.scorecheck()
proc
scorecheck()
global.cmpscore(src.name,src.pl)
spawn(3000)
src.scorecheck()


Take it and choke on it. If there's anything not working in this example, that's your responsibility to fix.