client
proc/save()
var/savefile/F=new("S123/F23/[ckey]")
F << usr
client/New()
var/savefile/F=new("S123/F23/[ckey]")
if(F)
F >> usr
usr << "<font color=red>File loaded!"
else
usr << "<font color=red>File not found!"
..()
Problem description:
Upon a reboot it won't save the amount of kills you have gained/the rank you earned. Here's the code for the ranks.
Code:
mob
var
rank="Academy Student"
kills=0
proc
gain_kill(var/mob/M)
M.kills+=1
M << "<font color=yellow><i>You now have [M.kills] kills"
var/A=M.rank
if(M.kills==5)M.rank="Genin"
if(M.kills==20)M.rank="Chunin"
if(M.kills==50)M.rank="Jounin"
if(M.kills==100)M.rank="Anbu"
if(M.kills==150)M.rank="Kage"
if(M.kills==200)M.rank="Legend"
if(A!=M.rank)
M << "<font color=#00CCFF>Congratulations! You have been promoted to the rank of [M.rank]"
2) You shouldn't assign to usr like that.
3) You should not be using client/New(), but rather a temporary login mob.