Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MS4
#38
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:
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?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)