ID:144439
 
Code:Save Code
turf/CNew
Click()
usr.Create()
turf/Load
Click()
usr.Load()
turf/Delete
Click()
usr.delete()
mob/var/char_name
mob/var/SaveSlot
mob/var/Saves
mob/proc/SaveF()
var/savefile/F=new("savefiles/[src.ckey][SaveSlot].sav")
F["last_x"] << src.x// This stuff saves the players location
F["last_y"] << src.y
F["last_z"] << src.z
F["overlays"] << src.overlays
F["paper"] << src.bought
Write(F)


mob/gm1/verb/SaveWorld()
usr<<"\red <b>{Server}:\blue Saving..."
sleep(20)
SaveF()
sleep(20)
usr<<"\red <b>{Server}:\blue Saved"

world/proc/save()
usr<<"\red <b>{Server}:\blue Auto Saving..."
sleep(20)
SaveF()
sleep(20)
usr<<"\red <b>{Server}:\blue Auto Saved"
sleep(300)
save()


Problem description:the world proc's SaveF() isnt working it says this: Saving.dm:33:error:SaveF:undefined proc, when clearly its defined above.

please get back ta me
-Volks
Your running savef in a world proc it has no defined mob..

world/proc/save()
usr<<"\red <b>{Server}:\blue Auto Saving..."
sleep(20)
for(var/mob/M in world)
if(M.client)
M.SaveF()
sleep(20)
usr<<"\red <b>{Server}:\blue Auto Saved"
sleep(300)
save()
Ugh, that code could really be made better. Though, I'll answer what you're asking. You can't define new vars and procs under world, if you want a global/object-less proc or var just define it without the world path.
proc/MyProc()