teh jimpie Posted June 18, 2010 Author Share Posted June 18, 2010 HiWhen I add the following packets:> HandleDataSub(SMoveEditor) = GetAddress(AddressOf HandleMoveEditor)> HandleDataSub(SUpdateMove) = GetAddress(AddressOf HandleUpdateMove)and compile, I'll get a subscript out of range error while logging in on the game.>! ```Private Sub HandleUpdateMove(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 MoveSize As Long Dim MoveData() As Byte Set Buffer = New clsBuffer Buffer.WriteBytes Data() n = Buffer.ReadLong ' Update the move MoveSize = LenB(Move(n)) ReDim MoveData(MoveSize - 1) MoveData = Buffer.ReadBytes(MoveSize) CopyMemory ByVal VarPtr(Move(n)), ByVal VarPtr(MoveData(0)), MoveSize Set Buffer = Nothing>! End Sub``````Private Sub HandleMoveEditor() Dim I As Long>! With frmEditor_Move 'Editor = EDITOR_MOVE .lstIndex.Clear>! ' Add the names For I = 1 To MAX_MOVES .lstIndex.AddItem I & ": " & Trim$(Move(I).Name) Next>! .Show .lstIndex.ListIndex = 0 ItemEditorInit End With>! End Sub```can anybody help? Link to comment Share on other sites More sharing options...
Robin Posted June 18, 2010 Share Posted June 18, 2010 Tell me where you get the error. Link to comment Share on other sites More sharing options...
teh jimpie Posted June 18, 2010 Author Share Posted June 18, 2010 There you gohttp://www.youtube.com/watch?v=YruGPY4XSlQ Link to comment Share on other sites More sharing options...
Robin Posted June 18, 2010 Share Posted June 18, 2010 Press CTRL & F5\. Don't recompile the .exe every time you want to test something.Tell me which line it errors on. Link to comment Share on other sites More sharing options...
teh jimpie Posted June 18, 2010 Author Share Posted June 18, 2010 > Private Sub HandleUpdateMove(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 MoveSize As Long> Dim MoveData() As Byte> Set Buffer = New clsBuffer> Buffer.WriteBytes Data()> n = Buffer.ReadLong> ' Update the move> MoveSize = LenB(Move(n))> ReDim MoveData(MoveSize - 1)> MoveData = Buffer.ReadBytes(MoveSize)> CopyMemory ByVal VarPtr(Move(n)), ByVal VarPtr(MoveData(0)), MoveSize> Set Buffer = Nothing> > End Sub Link to comment Share on other sites More sharing options...
balliztik1 Posted June 19, 2010 Share Posted June 19, 2010 Move is a VB6 keyword, for one. You'll likely not be able to use it.Since it's a subscript out of range, I venture to say your Move() array isn't dimmed high enough. Link to comment Share on other sites More sharing options...
teh jimpie Posted June 21, 2010 Author Share Posted June 21, 2010 @Ballie:> Move is a VB6 keyword, for one. You'll likely not be able to use it.> > Since it's a subscript out of range, I venture to say your Move() array isn't dimmed high enough.sorry, late reaction, but what do you mean by that? I've changed all "Move" to "PMove".also, I've found this: ' The order of the packets must match with the client's packet enumerationwhat does it exactly mean? Do I need to order the packets? Must I order everything the same in modEnumerations? 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