iHero Posted May 13, 2013 Author Share Posted May 13, 2013 **Introduction**In some packages, the index value of the player, which is sent from Sub HandleData, is always 1.**Client~Side**> modHandleDataFind:``` CallWindowProc HandleDataSub(MsgType), 1, Buffer.ReadBytes(Buffer.Length), 0, 0```Replace for:``` CallWindowProc HandleDataSub(MsgType), MyIndex, Buffer.ReadBytes(Buffer.Length), 0, 0```**Credits**Ricardo Link to comment Share on other sites More sharing options...
hisherwin Posted May 14, 2013 Share Posted May 14, 2013 erm explain it when it was not fixed.. what is the problem,? Link to comment Share on other sites More sharing options...
abhi2011 Posted May 14, 2013 Share Posted May 14, 2013 Index 1 = server. Since the Client socket wasn't an array. And Index was never used in the modHandleData Subs. Link to comment Share on other sites More sharing options...
iHero Posted May 14, 2013 Author Share Posted May 14, 2013 Actually has:```Private Sub HandlePlayerExp(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBufferDim i As LongDim TNL As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set Buffer = New clsBuffer Buffer.WriteBytes Data() SetPlayerExp Index, Buffer.ReadLong TNL = Buffer.ReadLong frmMain.lblEXP.Caption = GetPlayerExp(Index) & "/" & TNL ' mp bar frmMain.imgEXPBar.width = ((GetPlayerExp(MyIndex) / EXPBar_Width) / (TNL / EXPBar_Width)) * EXPBar_Width ' Error handler Exit Suberrorhandler: HandleError "HandlePlayerExp", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit SubEnd Sub``````Private Sub HandlePlayerStats(ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)Dim Buffer As clsBufferDim i As Long' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerSet Buffer = New clsBufferBuffer.WriteBytes Data()For i = 1 To Stats.Stat_Count - 1 SetPlayerStat Index, i, Buffer.ReadLong frmMain.lblCharStat(i).Caption = GetPlayerStat(MyIndex, i)Next' Error handlerExit Suberrorhandler:HandleError "HandlePlayerStats", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub``` Link to comment Share on other sites More sharing options...
abhi2011 Posted May 14, 2013 Share Posted May 14, 2013 Then that specific part should be changed to MyIndex. Index = 1 will always be the server connection index. Link to comment Share on other sites More sharing options...
iHero Posted May 14, 2013 Author Share Posted May 14, 2013 Would mean the same … Link to comment Share on other sites More sharing options...
JohnPony Posted May 14, 2013 Share Posted May 14, 2013 > Then that specific part should be changed to MyIndex. Index = 1 will always be the server connection index.Go away. Link to comment Share on other sites More sharing options...
abhi2011 Posted May 15, 2013 Share Posted May 15, 2013 > Go away.Don't you guys have to fight a war and die or something? Link to comment Share on other sites More sharing options...
Alerd Posted September 24, 2013 Share Posted September 24, 2013 I'm sorry but I do not understand that is it helps or not? 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