actually, one last question. I'm attempting to make a save/load process, but to no avail. when I'm doing it, I'm using a global variable such as the ones that I was using before. Would this be a good way to go about this or would it be better to make a file in like, config? I've had no good experiences with files before and can't seem to get them working.
function SaveLoadout(%c) {
if(!isObject(%c)) {
messageClient(%c,'',"\c3You cannot save current loadout - you do not have a client!");
return;
} else {
%maxtools=%c.player.getDatablock().MaxTools;
for(%i=0;%i<%maxTools;%i++) {
$GunMod::Loadout[%c.getBLID] = $GunMod::Loadout[%c.getBLID] + %c.player.tool[%i].getname();
}
}
}
function LoadLoadout(%c) {
%p=%c.player;
%maxtools = %p.getDatablock().maxtools;
if(getWordCount($GunMod::Loadout[%c.getBLID]) > %maxtools) {
messageClient(%c,'',"\c3Your tool loadout has too many tools for your current inventory.");
} else {
for(%i=0;%i<getwordcount($GunMod::Loadout[%c.getBLID]);%i++) {
%player.tool[%i]="";
%player.weaponcount--;
%tool = getWord($GunMod::Loadout[%c.getBLID],%i);
%player.tool[%i] = %tool.getID;
%player.weaponcount++;
messageClient(%c,'MsgItemPickup','',%i,%tool);
}
}
}
is the code. I don't know why, but it's saving as $GunMod::Loadout[%c.getBLID] instead of a BLID.. would it be taking this literally? It also saves that variable as 0, and I don't know why.