ID:266151
 
Can someone help tell me the code for auto save
mob/verb/write()
var/savefile/F = new()
var/txtfile = file("players/[ckey].txt")

F[ckey] << usr

fdel(txtfile)
F.ExportText("/",txtfile)

usr << "Your savefile looks like this:"

usr << "
[file2text(txtfile)]
"


mob/verb/read()
var/savefile/F = new()
var/txtfile = file("players/[ckey].txt")

F.ImportText("/",txtfile)
F[ckey] >> usr

mob
Login()
..()
read()
Logout()
write()

found that in the F1 help menu.......
SSJ4_Link wrote:
Can someone help tell me the code for auto save

I have a library that does it for you automatically with no code needed on your part.

Check out:

byond://Deadron.SimpleSaving

That's a demo that shows you how to use the library.