Quote:
Originally Posted by killerogue
What exactly do you think I'm doing?
|
Apparently not what I told you to do.
Say I have (Apple = 1), and (Bannana = 2) saved in ("mud/food"). To edit one of them without overwriting the whole file this is what I have to do.
PHP Code:
this.newInfo.loadVars("mud/food");
this.newInfo.Bannana = 3;
this.newInfo.saveVars("mud/food", false);
That would change the bannana value to 3, and wont do anything to the apple.
Edit to respond to the post above:
Ok if you want to add something then my method will still work.
PHP Code:
this.newInfo.loadVars("mud/food");
this.newInfo.Pie = 5;
this.newInfo.saveVars("mud/food", false);
Would add 'Pie' to the file, and will leave everything else alone.
To sum it all up just add this:
PHP Code:
temp.savedChar.loadVars(temp.filepath);
Before:
PHP Code:
temp.savedChar.loadVarsFromArray( temp.clientVars );