ID:142129
 
Code:
mob
proc
AutoSave()
if(src.cansave)
if(fexists("players/[src.key]/Slot_1.sav"))
var/savefile/s1 = new("players/[src.key]/Slot_1.sav")
src.saveS1 = 1
src.V = src.verbs
src.xco = src.x
src.yco = src.y
src.zco = src.z
Write(s1)
if(src.cansave)
if(fexists("players/[src.key]/Slot_2.sav"))
var/savefile/s2 = new("players/[src.key]/Slot_2.sav")
src.saveS2 = 1
src.V = src.verbs
src.xco = src.x
src.yco = src.y
src.zco = src.z
Write(s2)
if(src.cansave)
if(fexists("players/[src.key]/Slot_3.sav"))
var/savefile/s3 = new("players/[src.key]/Slot_3.sav")
src.saveS3 = 1
src.V = src.verbs
src.xco = src.x
src.yco = src.y
src.zco = src.z
Write(s3)


Problem description:
My Autosave proc isn't working correctly, I've tried many different ways to make it work but it won't.
What's the point of making 3 of the same exact save file? What are you trying to accomplish?
In response to Kaiochao
Looks like he is making slots, but yes he is doing what you have said silly really.
Besides the fact that you're creating three of the same file, like Kaioken said, you probably have the save proc located in the Logout() proc, correct? If that's the case, look up client/Del() and mob/Logout().
In response to A.T.H.K
Yes this is a 3 save slot, Im trying to make the save autosave to the right slot instead of saving it to all three.
In response to Jeff8500
Kaiochao*.=P
In response to Garruea
It's stupid though. If they have 3 save files, it will overwrite all three with the current one.
In response to Jeff8500
How would I make the slots save for current one the player has their character saved to?
In response to Garruea
Hmmm, how about make a tmp variable called some like 'Slot' and when they log in or load their character you set the slot number to the tmp variable i.e src.Slot = 2. That means they are on their Slot 2 Player and on the save you check if what slot they are on and then save according to it. I bet theres another way but Im not Bothered to think this out. Meh...

SubZeroChaos
In response to SubZeroChaos
Actually thats the way I had it setup before, but the loading proc wouldn't work correctly, until I fixed it, thats why is has the variable src.saves1 = 1 and so forth.