25-09-2009, 08:18 PM
It was using copymemory for the client, but wasn't reading it like it should server-side.
Anyway, it's all in HandleSaveItem.
Add at top:
Replace:
With:
Anyway, it's all in HandleSaveItem.
Add at top:
Code:
Dim ItemSize As Long
Dim ItemData() As Byte
Replace:
Code:
Item(n).Name = Buffer.ReadString
Item(n).Pic = Buffer.ReadLong
Item(n).Type = Buffer.ReadLong
Item(n).Data1 = Buffer.ReadLong
Item(n).Data2 = Buffer.ReadLong
Item(n).Data3 = Buffer.ReadLong
With:
Code:
ItemSize = LenB(Item(n))
ReDim ItemData(ItemSize - 1)
ItemData = Buffer.ReadBytes(ItemSize)
CopyMemory ByVal VarPtr(Item(n)), ByVal VarPtr(ItemData(0)), ItemSize
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?