Sorry for double post but I've obtained some info that might be of use.
The above error i mentioned is commonly attributed to servers and map rotations with too many maps which causes an overrun in the string because it has too many characters in the string causing it to hit the limit of char's that can be used in a string.
Now considering I'm hitting this on solo without a server mind you i'm not so sure that it's anything to do with server settings.
I also only get it once i hit the locker.
Somewhere it's hitting that character limit on a string once we trigger the storage function.
I make a lot of backups of my mod especially any time i go to add a new feature and this is with only me using harry's perks and his locker fix code provided by him here.
I understand some of what's happening but harry you might know better than i would about what might be causing the string character limit here to be hit.
Taking a look at the script you provided I wonder if it has to do with the way the non storable guns are set up but this is purely my speculation.
Anybody have any ideas on this? I'd be more than happy to learn about the inner workings of the engine and what could be causing this overrun.
Edit:
I've also read that a long dvar string can cause this as well which seems more likely, at this juncture, than the server related cause of this error.
Edit 2:
Tested setting
level.harry_perks_fix = true;
To false>compiled mod>pulled gun out of locker>closed game>set fix to true>compiled mod>
Was able to place gun in locker but it also kept it in inventory and on attempt to trade gun, whether same gun is in inventory or not, it throws the overrun error again.