var/savefile/F = new("house.sav") will save normally if there is no savefile found. But when caliing var/savefile/F = new("house.sav") when the file already exists it will not overwrite the save and will not do anything.
Code Snippet (if applicable) to Reproduce Problem:
mob/proc
save()
var/savefile/F = new("test.sav")
F["N"] << src.test
load()
if(fexists("test.sav"))
var/savefile/F = new("test.sav")
F["N"] >> src.test
mob
var/test = 0
verb/Roll_Dice()
src.test = "[rand(1, 99999)]"
src.save()
usr << "[src.test]!!!"
Login()
..()
src.load()
usr << "Saved info [src.test]."
Expected Results:
Should save over the last savefiles stats.
Actual Results:
Loads the very first stats it saved.
Does the problem occur:
Every time? Or how often?
So far every time.
In other games?
Not sure.
On other computers?
Not sure.
When does the problem NOT occur?
Not sure I just took notice when I was coding and testing a house system I made.
Workarounds:
Just call fdel("test.sav") before it saves.
Except if I read you right, you're saying that the stat isn't changing at all. That definitely shouldn't be happening.
If you use a savefile editor, what does it show you? Also, is there any chance the savefile is being locked or write-protected?