ID:101402
 
Not a bug
BYOND Version:475
Operating System:Windows 7 Home Premium 64-bit
Web Browser:Firefox 3.6.8
Applies to:Dream Maker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
Attempting to find a work around for a previous report, I turned my savefiles into .txt files with F.ExportText("/",output_file) function.
Numbered Steps to Reproduce Problem:
Snippet shows it best...
Code Snippet (if applicable) to Reproduce Problem: Below is the my save function snippet...
            SavePlayer()
if(fexists("playersaves/[ckey].sav"))fcopy("playersaves/[ckey].sav","playersaves/backup/[ckey].sav")
var/savefile/F=new("playersaves/[ckey].sav")
F["version"]<<save_version
if(!F.dir.Find("forum_info"))F.dir+="forum_info"
if(!F.dir.Find("stat_info"))F.dir+="stat_info"
if(!F.dir.Find("personal_info"))F.dir+="personal_info"
if(!F.dir.Find("preferences"))F.dir+="preferences"
if(!F.dir.Find("coordinates"))F.dir+="coordinates"
if(!F.dir.Find("skills_abilities"))F.dir+="skills_abilities"
if(!F.dir.Find("misc"))F.dir+="misc"
F.cd="forum_info"
for(var/V in forum_info) F[V]<<vars[V]
F.cd="stat_info"
for(var/V in stat_info) F[V]<<vars[V]
F.cd="personal_info"
for(var/V in personal_info) F[V]<<vars[V]
F.cd="preferences"
for(var/V in preferences) F[V]<<vars[V]
F.cd="coordinates"
for(var/V in coordinates) F[V]<<vars[V]
F.cd="skills_abilities"
for(var/V in skills_abilities) F[V]<<vars[V]
F.cd="misc"
for(var/V in misc) F[V]<<vars[V]
var/output_file = file("playersaves/[ckey].txt")
fdel(output_file)
F.ExportText("/",output_file)
..()


Expected Results:
I was looking for something more like...
forum_info
username = null
password = null
saveinfo = null
stat_info
stamina = 100
hunter_notority = 0
blood = 100
blood_lust = 0
blood_line = 0
exp = 0
rexp = 1000
sprint = 3
speed = 5
str = 8
dex = 8
int = 8
chr = 8
wil = 8
pcp = 30
HP = 15
MaxHP = 15
lvl = null
personal_info
name = "Killer22"

Actual Results:
Here instead is what the .txt file shows.
version = 1.1000000238418579
forum_info
username = null
password = null
saveinfo = null
stat_info
stamina = 100
hunter_notority = 0
blood = 100
blood_lust = 0
blood_line = 0
exp = 0
rexp = 1000
sprint = 3
speed = 5
str = 8
dex = 8
int = 8
chr = 8
wil = 8
pcp = 30
HP = 15
MaxHP = 15
lvl = null
personal_info
name = "Killer22"

Does the problem occur:
Every time? Or how often? Yes
In other games? Not sure.
In other user accounts? Not sure.
On other computers? Not sure.

When does the problem NOT occur?
Happens each time I've tried it.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

Workarounds:
I've cd'd to the root directory after reach time a directory was made, same result. I then the code around so the directories would create just before adding the saved variables. Same results.

I'm not sure if this is a savefile bug, or a bug with ExportText.
Umm, there's a bug with the dm tags...

SavePlayer()
es/[ckey].sav"))fcopy("playersaves/[ckey].sav","playersaves/ backup/[ckey].sav")
var/savefile/F=new("playersaves/[ckey].sav")
F["version"]<<save_version
if(!F.dir.Find("forum_info"))F.dir+="forum_info"
if(!F.dir.Find("stat_info"))F.dir+="stat_info"
if(!F.dir.Find("personal_info"))F.dir+="personal_info"
if(!F.dir.Find("preferences"))F.dir+="preferences"
if(!F.dir.Find("coordinates"))F.dir+="coordinates"
if(!F.dir.Find("skills_abilities"))F.dir+="skills_abilities"
if(!F.dir.Find("misc"))F.dir+="misc"
F.cd="forum_info"
for(var/V in forum_info) F[V]<<vars[V]
F.cd="stat_info"
for(var/V in stat_info) F[V]<<vars[V]
F.cd="personal_info"
for(var/V in personal_info) F[V]<<vars[V]
F.cd="preferences"
for(var/V in preferences) F[V]<<vars[V]
F.cd="coordinates"
for(var/V in coordinates) F[V]<<vars[V]
F.cd="skills_abilities"
for(var/V in skills_abilities) F[V]<<vars[V]
F.cd="misc"
for(var/V in misc) F[V]<<vars[V]
var/output_file = file("playersaves/[ckey].txt")
fdel(output_file)
F.ExportText("/",output_file)
..()
If you want the path to reset with cd put the "/" in front. This is not a bug.