ID:139395
 
Code:
world
hub="Iocamus.ShinobiChronicles"
view = "25x25"
name = "Shinobi Land"
status = "Updated 2.1"
tick_lag=1
cache_lifespan=0
loop_checks=0
turf=/turf/Blah
New()
..()
LoadMute()
LoadVillageNotes()
LoadNotepad()
LoadObjects()
log=file("Runtimes.log")
Security()
spawn Years()
spawn Begin()

/*for(var/area/outside/O in world) // Look for outside areas
spawn() O.daycycle()*/
// begin the daycycle


proc/Begin()
Load_Admins()
LoadRanks()
LoadChronicle()
Load_Ban()
LoadLogs()
LoadVillageNotes()
LoadRules()
LoadYear()


obj/EditVillagePage
verb
EditPage()
set category="Rank"
if(usr.Village=="Konohagakure")
KonohagakureNotes=input("Edit the VillageNotes!","Konohagakure","[KonohagakureNotes]")as message
var/savefile/F = new ("SSO/KonohagakureNotes.sav")
F["KonohagakureNotes.sav"]<< KonohagakureNotes
if(usr.Village=="Kirigakure")
KirigakureNotes=input("Edit the VillageNotes!","Kirigakure","[KirigakureNotes]")as message
var/savefile/F = new ("SSO/KirigakureNotes.sav")
F["KirigakureNotes.sav"]<< KirigakureNotes
if(usr.Village=="Sunagakure")
SunagakureNotes=input("Edit the VillageNotes!","Sunagakure","[SunagakureNotes]")as message
var/savefile/F = new ("SSO/SunagakureNotes.sav")
F["SunagakureNotes.sav"]<< SunagakureNotes

proc/LoadVillageNotes()
if(fexists("SSO/KonohagakureNotes.sav"))
var/savefile/F = ("SSO/KonohagakureNotes.sav")
F["KonohagakureNotes.sav"]>> KonohagakureNotes
if(fexists("SSO/KirigakureNotes.sav"))
var/savefile/F = ("SSO/KirigakureNotes.sav")
F["KirigakureNotes.sav"]>> KirigakureNotes
if(fexists("SSO/SunagakureNotes.sav"))
var/savefile/F = ("SSO/SunagakureNotes.sav")
F["SunagakureNotes.sav"]>> SunagakureNotes

Problem description:
When the world starts up it should load files that are created and saved when the world is running, however when it starts it creates new versions. I can't seem to figure out why. Above is an example of how the load/save procs look, as well as the current World thinger.

Your calling load village notes in both Begin and world new, but the problem is you did not put a new() when you are loading them.
In response to Pirion
So I should put a New() inside the actual load proc?
In response to Pirion
proc/SaveLogs()
var/savefile/S=new("SSO/AdminLogs")
S["AdminLogs"]<<Admin_Logs
proc/LoadLogs() if(fexists("SSO/AdminLogs"))
var/savefile/S=("SSO/AdminLogs")
S["AdminLogs"]>>Admin_Logs

This is a simpler load proc that isn't working, could you fix it so I could use it as an example?
In response to Monkeymonk94
In your save:
var/savefile/S=new("SSO/AdminLogs")


In your load:
var/savefile/S=("SSO/AdminLogs")


Notice something missing?
While it may seem strange to load a file using the word "new" (which would make you think you're making a new, blank file), it actually creates a new object (in this case, a savefile object) using the current file (if it exists, take it, otherwise create it).
In response to Emasym
That actually originally was there, but it was not working, so I removed it in hopes that it would load rather than recreate. But I forgot I removed it before changing the fact the load and save procs were identical and I switched the >> and <<'s. I'd assume it's working now. Thanks, I forgot about that.
In response to Emasym
proc/SaveLogs()
var/savefile/S=new("SSO/AdminLogs")
S["AdminLogs"]<<Admin_Logs
proc/LoadLogs() if(fexists("SSO/AdminLogs"))
var/savefile/S=new("SSO/AdminLogs")
S["AdminLogs"]>>Admin_Logs

This did not work
In response to Monkeymonk94
Couple of steps;
  1. Are you certain the fexists() is being passed?
  2. Tried giving the savefile an extension? (anything works)
  3. You're calling LoadVillageNotes twice (in world/New() and proc/Begin()), even if it's not causing the problem it's best to delete it from one of the two
  4. How are the variables you're loading declared?
  5. Have you tried loading it to a temp variable, instead of directly loading?

    var/notes
    S["SomeNotes"] >> notes
    VillageNotes=notes
In response to Emasym
    New()
..()
log=file("Runtimes.log")
Security()
spawn Years()
spawn Begin()

/*for(var/area/outside/O in world) // Look for outside areas
spawn() O.daycycle()*/
// begin the daycycle


proc/Begin()

Load_Admins()
LoadRanks()
LoadChronicle()
Load_Ban()
LoadLogs()
LoadVillageNotes()
LoadRules()
LoadYear()
LoadNotepad()
LoadObjects()
LoadMute()

I changed this when the other guy said to.

The variables are declared inproc and here is the layout of the majority

proc/SaveLogs()
var/savefile/S=new("SSO/AdminLogs")
S["AdminLogs"]<<Admin_Logs
proc/LoadLogs() if(fexists("SSO/AdminLogs"))
var/savefile/S=new("SSO/AdminLogs")
S["AdminLogs"]>>Admin_Logs

proc/LoadYear()
if(fexists("SSO/Year"))
var/savefile/F=new("SSO/Year")
F["Year"]>>Year
F["YearSpeed"]>>YearSpeed

proc/SaveYear()
var/savefile/F=new("SSO/Year")
F["Year"]<<Year
F["YearSpeed"]<<YearSpeed


proc/Save_Admins()
var/savefile/F=new("SSO/Admins")
F["1"]<<Admin1s
F["2"]<<Admin2s
F["3"]<<Admin3s
proc/Load_Admins() if(fexists("SSO/Admins"))
var/savefile/F=new("SSO/Admins")
F["1"]>>Admin1s
F["2"]>>Admin2s
F["3"]>>Admin3s

proc/Save_Ban()
var/savefile/S=new("Ban Save")
S["Bans"]<<Bans
proc/Load_Ban()
if(fexists("Ban Save"))
var/savefile/S=new("Ban Save")
S["Bans"]>>Bans

proc/SaveRules()
var/savefile/S=new("Rules")
S["Rules"]<<Rules
proc/LoadRules() if(fexists("Rules"))
var/savefile/S=new("Rules")
S["Rules"]>>Rules

As you can tell they are all basically set up the same way.