client
{
New()
{
if(fexists("saves/[ckey]"))
{
var savefile/f = new("saves/[ckey]");
f>>usr;
src<<"Savefile loaded.";
}
return ..()
}
Del()
{
var savefile/f = new("saves/[ckey]");
f<<usr;
return ..()
}
}
Even after simplifying the code this much, I cannot get it to save 2 variables that I am trying to save.
As said, I have two variables. One is numeric, another is a list. I have tried many different methods to save these, and it wont load.
Can anyone suggest the best way to do this? I have no idea what I am doing wrong.
I tried doing f["cash"]<, but it didn't load anything back.
</<cash>
You should also not be using usr here, as it is inappropriate in procs.
Beyond that you'll need to show the declarations of the vars involved.