What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Question about the class ChatMessageEventArgs

shane86

New Member
Joined
Sep 6, 2010
Messages
348
Reaction score
4
Hello i'm trying to develop a plugin for honorbuddy and I keep getting the following compiler error:


Plugin from C:\honorbuddy\Plugins\pvpbot could not be compiled! Compiler errors:
File: Main.cs Line: 689 Error: The type or namespace name 'ChatMessageEventArgs' could not be found (are you missing a using directive or an assembly reference?


The code it's talking about is here:

Code:
public void WoWChat_HandleMessage(ChatMessageEventArgs e){
    Logging.Write("Someone has said something"+ e.Message.Text);
    string test = e.Message.Content;
    Logging.Write("Message :" + e.Message.Content);
    if (test.IndexOf("GO!!! GO!!!",1) > 0) {
         Logging.Write("I can GO!!! " + test + "^^" + e.Message.ChatType);
     gopvp =true;
    }
    if (IsInParty()) WoWChat.SendChatMessage("ok omw!", ChatType.Party, "");
}
        private bool IsInParty()
        {
            List<WoWPlayer> partyMembers = Me.PartyMembers;
            return (partyMembers.Count > 0);

        }


What reference am I missing in the class ChatMessageEventArgs? In your documentation it says:

Code:
 [COLOR=darkgray][/COLOR] Initializes a new instance of the [URL="http://www.thebuddyforum.com/9d779e8e-fd94-5ffe-f7af-6a3080ca33ce.htm"][COLOR=#ffffff]ChatMessageEventArgs[/COLOR][/URL]  class
 [B]Namespace:[/B]  [URL="http://www.thebuddyforum.com/42f5f395-8f5d-7f27-c96f-342827fee0dc.htm"]Styx.WoWInternals[/URL]
[B]Assembly:[/B]   Styx (in Styx.dll) Version: 1.0.0.0 (1.0.0.0) 
[B][IMG]http://www.thebuddyforum.com/@MSITStore:C:%5CUsers%5Cshane%5CAppData%5CLocal%5CTemp%5CRar$DI63.528%5CAPI%20Documentation%20Honorbuddy%202.0.chm::/icons/collapse_all.gif[/IMG]Syntax[/B]

   <table> <tbody> <tr> <th>C#</th></tr> <tr> <td>
public [COLOR=#ffffff]ChatMessageEventArgs[/COLOR]( 	[URL="http://www.thebuddyforum.com/38c9b5f3-35fc-1e31-1f60-eae519c8381c.htm"]WoWChatMessage[/URL] message )</pre></td></tr></tbody></table> <table> <tbody> <tr> <th>Visual Basic (Declaration)</th></tr> <tr> <td>
Public Sub New ( _ 	message As [URL="http://www.thebuddyforum.com/38c9b5f3-35fc-1e31-1f60-eae519c8381c.htm"]WoWChatMessage[/URL] _ )</pre></td></tr></tbody></table> <table> <tbody> <tr> <th>Visual C++</th></tr> <tr> <td>
public: [COLOR=#ffffff]ChatMessageEventArgs[/COLOR]( 	[URL="http://www.thebuddyforum.com/38c9b5f3-35fc-1e31-1f60-eae519c8381c.htm"]WoWChatMessage[/URL]^ message )</pre></td></tr></tbody></table>
  [B]Parameters[/B]

 <dl><dt>message </dt><dd>Type: [URL="http://www.thebuddyforum.com/38c9b5f3-35fc-1e31-1f60-eae519c8381c.htm"]Styx.WoWInternals..::.WoWChatMessage[/URL]
[COLOR=#dc143c][B][Missing  <param name="message"/> documentation for "M:Styx.WoWInternals.[COLOR=#ffffff]ChatMessageEventArgs[/COLOR].#ctor(Styx.WoWInternals.WoWChatMessage)"][/B][/COLOR]
</dd></dl>

 [B][IMG]http://www.thebuddyforum.com/@MSITStore:C:%5CUsers%5Cshane%5CAppData%5CLocal%5CTemp%5CRar$DI63.528%5CAPI%20Documentation%20Honorbuddy%202.0.chm::/icons/collapse_all.gif[/IMG]See  Also[/B]

  [URL="http://www.thebuddyforum.com/9d779e8e-fd94-5ffe-f7af-6a3080ca33ce.htm"][COLOR=#ffffff]ChatMessageEventArgs[/COLOR]  Class[/URL]
 [URL="http://www.thebuddyforum.com/42f5f395-8f5d-7f27-c96f-342827fee0dc.htm"]Styx.WoWInternals  Namespace[/URL]


  [IMG]http://www.thebuddyforum.icons/footer.gif[/IMG]

And that's what I did. Is this documentation out of date or what's the story here? I'm using the styx.WoWInternals namespace.
 
Hi,

Use M$ Visual C# express to avoid that kind of issues (ctrl+. and ctrl+space are your friends). Make sure you are referencing the right HB dlls too.

And yes, that code snippet is quite old.
 
Back
Top