I get the error when I go to run and compile, then i try and log in, I then click debug and the error occurs at CopyMemory ByVal VarPtr(Npc(n)), ByVal VarPtr(NpcData(0)), NpcSize the full section is Private Sub HandleUpdateNpc(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim n As Long Dim Buffer As clsBuffer Dim NpcSize As Long Dim NpcData() As Byte Set Buffer = New clsBuffer Buffer.WriteBytes Data() n = Buffer.ReadLong ' Update the Npc NpcSize = LenB(Npc(n)) ReDim NpcData(NpcSize - 1) NpcData = Buffer.ReadBytes(NpcSize) CopyMemory ByVal VarPtr(Npc(n)), ByVal VarPtr(NpcData(0)), NpcSize Set Buffer = Nothing End Sub