What the forget do you mean?
There's a saving function, there's a loading function, what the forget else does a data saver do?
#1, you didn't even define the path to save stuff to,
#2, you didn't even define a format for it to go by, so it knows what it's loading.
// ============================================================
// Project : CityRPG
// Created on : Saturday, November 03, 2012 9:36 PM
// Description : Stat saving file
// Author : JazZ
// ============================================================
package Anna
{
function DataHolder::savePlayer(%this, %client)
{
%this.data[%client.BL_ID, "VARNAME"] = %client.variable;
%this.data[%client.BL_ID, "Money"] = %client.money;
%this.data[%client.BL_ID, "Bank"] = %client.bank;
%this.save("filepath"); //filepath needs to be defined... Do it quick so I can work
}
function DataHolder::loadPlayerData(%this, %client)
{
%client.variable = %this.data[%client.BL_ID, "VARNAME"];
%client.money = %this.data[%client.BL_ID, "Money"];
%client.bank = %this.data[%client.BL_ID, "Bank"];
}
function loadPlayerData()
{
while(isObject(MyDataHolder))
MyDataHolder.delete();
exec("config/My_Addon/PlayerData.cs"); //dafuq? why are you executing it? running code? If it is not code just open the file to read.
}
};
ActivatePackage(Anna);
best saving system 2012
amirite?