ID:149735
 
This is the code I have so far. What I need it to do is every 30mins, 80 is there now for testing.. To save every object in area/objsavetile. And upon reboot it loads it up and places it back there. Can anyone tell me what else I should have??

LJR


world/New()
var/koo=/area/objsavetile
for(var/obj/O in koo)
var/savefile/F=new("objsavetile.sav")
F >> O
..()


/////////////
// AREA //
// Layer 1 //
/////////////
area/objsavetile/New()
Savestuff()
..()

area/objsavetile/proc/Savestuff()
spawn while(1)
sleep(80) //18000
if(isarea(/area/objsavetile))
var/koo=/area/objsavetile
for(var/obj/O in koo)
var/savefile/F=new("objsavetile.sav")
F << O
F << O.x
F << O.y
F << O.z
I still need help with this code, does anyone have a clue???

LJR
LordJR wrote:
This is the code I have so far. What I need it to do is every 30mins, 80 is there now for testing.. To save every object in area/objsavetile. And upon reboot it loads it up and places it back there. Can anyone tell me what else I should have??

Looks like you need a basic understanding of how savefiles store data. If you haven't already, try reading this:

http://www.deadron.com/Games/ByondBasicSavefiles.html