Bug Report
Printed From: Mirage Source
Category: Tutorials
Forum Name: Temporary Archive (Read Only)
Forum Discription: Temporary 3.0.3 archive tutorials, will be deleted when converted.
URL: http://ms.shannaracorp.com/backup-forums/forum_posts.asp?TID=162
Printed Date: 20 December 2006 at 5:52pm Software Version: Web Wiz Forums 8.01 - http://www.webwizforums.com
Topic: Bug Report
Posted By: Sync
Subject: Bug Report
Date Posted: 11 February 2006 at 3:12pm
Difficulty: Medium 4/5 *only because you need to convert all the &*
Originaly Posted By: Solosturm
forgot original author, funny thing is that i ggot it within the past 24 hours... wow, huh?
Since nothing is perfect, why not let the players let YOU know what’s wrong with what and so on and so forth.
Lets begin with the Client, you will obviously need some code there. Open up modGameLogic and locate
Code: ' Kicking a player
Right under that piece of code for kicking a player, add the following piece of code.
Code: ' Report a bug If LCase(Mid(MyText, 1, 4)) = "/bug" Then If Len(MyText) > 5 Then MyText = Mid(MyText, 6, Len(MyText) - 5)
Call SendBReport(MyText) End If MyText = "" Exit Sub End If
And now, we open modClientTCP and scroll all way down and add the following code:
Code: ' bugreport Sub SendBReport(ByVal Text As String) Dim Packet As String
Packet = "BUGREPORT" & SEP_CHAR & Text & SEP_CHAR & END_CHAR Call SendData(Packet) End Sub
Alright, that should do it, save, compile and exit. Now, open the Server project and open modDatabase, right under PLAYER_LOG, add
Code: Public Const BUG_REPORTS = "bugreports.txt"
Note that you MAY have to change the string for that constant ;P Anyhow, lets move on and open modServerTCP and find Location Packet. Just under that piece of code there, add the following:
Code: ' :::::::::::::::::::::::: ' :: Bugreport packet :: ' :::::::::::::::::::::::: If LCase(Parse(0)) = "bugreport" Then
Call PlayerMsg(Index, "Thank you for reporting the bug.", Yellow) Call AddLog(GetPlayerName(Index) & " reported: " & Parse(1), "bugreports.txt")
Exit Sub End If
|
|