Code:
Local $interaction = DllStructGetData($aItemStruct,'Interaction')
Code:
long id;long agentId;byte unknown1[4];ptr bag;ptr modstruct;long modstructsize;ptr customized;byte unknown2[4];byte type;byte unknown3;short extraId;short value;byte unknown4[2];short interaction;long modelId;ptr modString;byte unknown5[4];ptr NameString;byte unknown6[15];byte quantity;byte equipped;byte unknown7[1];byte slot
Code:
Local $interaction = MemoryRead($aItemPtr + 40,'short')
THE PROBLEM:
I'm trying to programatically figure out the offset (and type) based on the above Struct string, but its not working for ModelID. According to the above method, ModelID is directly after Interaction, meaning an offset of 42, right?
Well its actually 44, and I don't know where the extra 2 bytes have come from - if we added another "byte unknown[2]" in there, then the DllStruct itself would be wrong.
Thanks for reading, any help or explanation on this one would be appreciated!