macht102 Posted July 20, 2010 Author Share Posted July 20, 2010 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 atCopyMemory ByVal VarPtr(Npc(n)), ByVal VarPtr(NpcData(0)), NpcSizethe full section isPrivate 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 = NothingEnd Sub Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now