Question: Why not just make P().Pack as string * 32?
TYPE Player
....
Pack AS STRING * 32
....
END TYPE
Then, in SUB Add_To_Inventory, use _MEM to reference that string...
SUB Add...
STATIC m as _MEM ‘no need to initialize/free it over and over
STATIC String_Offset AS _OFFSET
m = _MEM(P(WHO%%)) ‘Just change where you want to point it to.
String_Offset = m.OFFSET + 28 ‘move to where P(Who%%).Pack starts at in memory
At this point, you memget/memput as you were, but from String_Offset instead of from P(Who%%).Pack.Offset and such, as before...
I haven’t tried it, but it should work for you, and still preserve the Type in such a manner so you can GET/PUT it to file like normal, with no issues.
Example — INSTEAD OF:
_MEMGET(P(Who%%).Pack, P(Who%%).Pack.OFFSET + i%% * 2, _BYTE)
YOU WOULD:
_MEMGET(m, String_Offset + i% * 2, _BYTE)