@Friznit You can save custom variables:
http://alivemod.com/wiki/index.php/Persistence#Editor_Notes
Excuse my incompetence, but how would I incorporate the variable _creditsCurrent into that code?
_credisCurrent is a getvariable code that returns the number of credits i.e
_creditsCurrent = factory1 getVariable "R3F_LOG_CF_credits";
Do I put both the load and save functions in the init.sqf?
Something like:
in init.sqf
_creditsCurrent = factory1 getVariable "R3F_LOG_CF_credits";
["_creditsCurrent",_credits] call ALiVE_fnc_ProfileNameSpaceSave;
waituntil {(player getvariable ["alive_sys_player_playerloaded",false])};
_credits = "_creditsCurrent" call ALiVE_fnc_ProfileNameSpaceLoad;
_creditsSet = factory1 setVariable ["R3F_LOG_CF_credits", _credits, true];
or would I want to rather do the setVariable function, like so:
_creditsVar = factory1 getVariable "R3F_LOG_CF_credits";
_creditsCurrent = factory1 setVariable ["R3F_LOG_CF_credits", _creditsVar, true];
["_creditsCurrent",_credits] call ALiVE_fnc_ProfileNameSpaceSave;
waituntil {(player getvariable ["alive_sys_player_playerloaded",false])};
_credits = "_creditsCurrent" call ALiVE_fnc_ProfileNameSpaceLoad;
Sorry, I'm not very experienced when it comes to coding, just a little dabbling here and there.