ID:164304
 
I just started coding yesterday and Im just experimenting things, but one thing I want to learn is how to make savefiles. I've read through the DM guide and resource and i still dont get how to save characters. I would really like someone to explain how savefiles work and how to make codes for them. I'd really appreciate the help!

PS, on a side note, instead of just making a new thread, i'll put it here. How would you code in a rest verb. Like, how to stop movemnt, increase two vars to the max var.
Savefiles baffled me for a while too.

verb
save()
var/savefile/F=new/savefile("filename") // Replace filename with the name you want.
usr.Write(F) // The Write proc writes the object "usr" to the savefile "F".


Of course usr isn't necessary, Write(F) would have done the same thing, but I put it in for demonstrational purposes. Chapter 12 of the DM Guide: http://www.byond.com/docs/guide/ explains savefiles better than I could.
In response to ShadowUser
Thanks.