![]() |
Packet Checker - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Packet Checker (/showthread.php?tid=377) |
Packet Checker - William - 20-10-2006 Difficulty: 1/5 Introduction Has it ever happened to you, that you send packets that does not exist? Well, if you add this, you will be warned when a packet is sent that does not have a reciever. Tutorial Start: Client Side (IF) First, make sure that all the If (LCase(Parse(0)) in Sub HandleData has a Exit Sub before the End if. Ex) Code: ' :::::::::::::::::::: Code: Call SendData("PacketError" & SEP_CHAR & Parse(0) & SEP_CHAR & END_CHAR) Server Side Now make a listbox on the server and name it lstDebugPacket. Now anywere in Sub HandleData, add: Code: ' ::::::::::::::::::::::::::: Now, make sure all If LCase(Parse(0)) in Sub HandleData has a ExitSub, as you did for the Client. And at the bottom add: Code: frmServer.lstDebugPacket.AddItem "Client-Server" & Parse(1) & " | " & date & " | " & time Tutorial Start: Client Side (Select Case) So now if you use select case, you use pretty much the same system, but at the bottom of Sub HandleData, instead of adding that line of code, you add this before it: Code: Case Else Thats it! Now when a packet that does not exist in your game/engine is found. It will be typed in the listbox, so you easily can debug and find it ![]() |