#define DEBUG
/var/const/
scoreboard={""}
scoreboardtitle={"<STYLE>BODY {background: black; color: white}</STYLE><head><title>Scoreboard</title></head></body>"}
/Rank_Entry/
var{Name;Key;maxpowerlevel;Date}
New(mob/person)
if(!person)return
Name=(person.name)
Key=(person.key)
maxpowerlevel=(person.maxpowerlevel)
Date=(time2text(world.realtime))
/proc/
RankingDisplay(var/mob/person)
var/list/maxpowerlevel=new()
var/savefile/F=new("levels.sav")
F[("stuff")]>>(maxpowerlevel)
var/html="<center><TABLE BORDER=1><TR><TH><html><BODY><center><h1>Scoreboard</h1><TABLE CELLSPACING=10>"
if(!maxpowerlevel)html+="<TR><TD>No high rankings to display.</TD></TR>\n"
else
html+="<tr><th>#</th><th>Name (key)</th><th>Level</th><th>Date</th></tr>\n
"
for(var/number in 1 to maxpowerlevel.len)
var{character=(maxpowerlevel[(number)]);Rank_Entry/player=(maxpowerlevel[(character)])}
html+="<tr><td>[(number)]\th</td><td>[(player.Name)] ([(player.Key)])</td><td>[num2text(round(player.maxpowerlevel),100)]</td><td>[(player.Date)]</td></tr>\n"
person<<browse("[scoreboardtitle][html]","window=scoreboard;size=524x344")
Ranking(var/mob/player)
if(!player||!player.client)return
var/savefile/F=new("levels.sav")
var/list/maxpowerlevel=new()
F[("stuff")]>>(maxpowerlevel)
if(!maxpowerlevel)maxpowerlevel=new()
var{character="[(player.client.ckey)]/[(player.name)]"
score=maxpowerlevel.Find(character)
Rank_Entry/newest=new(player)
Rank_Entry/last}
if(score)
var/Rank_Entry/old=(maxpowerlevel[(character)])
if(old.maxpowerlevel>=player.maxpowerlevel)return score
while(score>1)
last=maxpowerlevel[(maxpowerlevel[(score-1)])]
if(last.maxpowerlevel>=player.maxpowerlevel)break
maxpowerlevel[(score)]=(maxpowerlevel[(score-1)])
maxpowerlevel[(--score)]=(character)
maxpowerlevel[(maxpowerlevel[(score+1)])]=(last)
maxpowerlevel[(character)]=(newest)
F[("stuff")]<<(maxpowerlevel)
return score
score=(maxpowerlevel.len)
if(score>=100)
last=(maxpowerlevel[(maxpowerlevel[(score)])])
if(last.maxpowerlevel>=player.maxpowerlevel)return 11
maxpowerlevel[(score)]=(character)
else score=(maxpowerlevel.len+1),maxpowerlevel+=(character)
while(score>1)
last=(maxpowerlevel[(maxpowerlevel[(score-1)])])
if(last.maxpowerlevel>=player.maxpowerlevel)break
maxpowerlevel[(score)]=(maxpowerlevel[(score-1)])
maxpowerlevel[(--score)]=(character)
maxpowerlevel[(maxpowerlevel[(score+1)])]=(last)
maxpowerlevel[(character)]=(newest)
F[("stuff")]<<(maxpowerlevel)
return score
scoreboard.dm:21: unterminated text (expecting ")
scoreboard.dm:22: unterminated text (expecting ")
scoreboard.dm:23:error: expected expression
Got any reasons why its doing this?
It's this line, put { } brackets around the ""'s
Note: Since you didn't tell us which line it was, I think you could figure out where this goes. =P