These scripts don't work anymore.
BI recently added getUnitLoadout and setUnitLoadout, use those.
If you are using ACE3 you can probably use ACE_common_fnc_getAllGear and ACE_common_fnc_setAllGear
Repository for http://forums.bistudio.com/showthread.php?148577-GET-SET-Loadout-(saves-and-loads-pretty-much-everything)