Packets have 3 internal variables:
1. Memory size: this is the amount of memory allocated to the packet via mnChangeMemorySize or mnSetMemorySize. The used size can't exceed this.
2. Used size: this is the amount of memory in use. Initially it is 0, but if you add data to it it will increase. mnSendTCP and mnSendUDP will send all data up to the used size.
3. Cursor position: data is inserted at this point. The cursor can be moved anywhere in the packet using mnSetCursor. The cursor is moved forward by the amount of data written or read using an mnAdd or mnGet command.
This example should help:
Lets say I add 3 bytes to a packet, after first using mnSetMemorySize to allocate 5 bytes of memory to the packet.
Initially: Used size = 0, Cursor position = 0, Memory size = 5.
mnAddByte(50): Used size = 1, Cursor position = 1, Memory size = 5.
mnAddByte(12): Used size = 2, Cursor position = 2, Memory size = 5.
mnAddByte(15): Used size = 3, Cursor position = 3, Memory size = 5.
The packet contains 50, 12 and 15 in that order.
If I use mnSetCursor and set the cursor back to 0 (which it was initially) and then use mnAddByte(10) the internal variables look like this: Used size = 3, Cursor position = 1, Memory size = 5 and the data is: 10, 12 and 15 in that order (50 was overwritten).
If your packet looks like this: mnAddFloat, mnAddByte, mnAddInt, you should read it in the same way when the packet is received on the other end: mnGetFloat, mnGetByte, mnGetInt.
When packets are received they are put into a queue and the mnRecv commands get them from a queue. If you are using UDP modes 'per client' or 'per client, per operation' you have to have specific data at the start of the packet (see documentation for more info).
Hope you found that useful