ID:272819
 
ok the new features of byond the medals and scoring system i just can't get it up and running for my game i did add it on the hub and here's my code.

mob/proc/RecordResults(money, Loses, Duels, Wins, StarChips)
spawn(-1)
var/list/records
var/result = world.GetScores(key, "")
if(isnull(result))
src << "Sorry, the hub could not be contacted to record your score."
return
records = params2list(result)







var/list/new_records = new
new_records["Duels"] = max(money, text2num(records["Duels"]))
new_records["StarChips"] = max(money, text2num(records["StarChips"]))
new_records["money"] = max(money, text2num(records["money"]))
new_records["Wins"] = max(Wins, text2num(records["Wins"]))
new_records["Loses"] = max(Loses, text2num(records["Loses"]))
if(Wins)
new_records["Wins"] = text2num(records["Wins"] || "0") + 1
else
new_records["Loses"] = text2num(records["Loses"] || "0") + 1
if(world.SetScores(key, list2params(new_records)))
src << "Your Statss has been recorded into the STATRACKKER [Wins ? "victory" : "failure"]."
else
src << "Sorry, the hub could not be contacted to record your score."
What in particular are you having trouble with? You didn't mention what the problem is.

Lummox JR
In response to Lummox JR
well its not doing anything like adding the scores when people log out thats what it is and idk if the codes right..