RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

\-Deleted-/

S

Seven

Guest
\-Deleted-/

making me get warnings in every custom file
[code:1]
using System;
using Server;
using Server.Items;

namespace Server.Misc
{
public class Keywords
{
public static void Initialize()
{
// Register our speech handler
EventSink.Speech += new SpeechEventHandler( EventSink_Speech );
}

public static void EventSink_Speech( SpeechEventArgs args )
{
Mobile from = args.Mobile;
int[] keywords = args.Keywords;

for ( int i = 0; i < keywords.Length; ++i )
{
switch ( keywords )
{
case 0x002A: // *i resign from my guild*
{
if ( from.Guild != null )
from.Guild.RemoveMember( from );

break;
}
case 0x0032: // "*i must consider my sins*
{
from.SendMessage( "Short Term Murders : {0}", from.ShortTermMurders );
from.SendMessage( "Long Term Murders : {0}", from.Kills );
break;
}
}
}
}
}
}
[/code:1]

ERROR FIXED -= Post Deleted-=
 

CrazyJester

Wanderer
this should fix your problems :p
[code:1]using System;
using Server;
using Server.Items;

namespace Server.Misc
{
public class Keywords
{
public static void Initialize()
{
// Register our speech handler
EventSink.Speech += new SpeechEventHandler( EventSink_Speech );
}

public static void EventSink_Speech( SpeechEventArgs args )
{
Mobile from = args.Mobile;
int[] keywords = args.Keywords;

for ( int i = 0; i < keywords.Length; ++i )
{
switch ( keywords )
{
case 0x002A: // *i resign from my guild*
{
if ( from.Guild != null )
from.Guild.RemoveMember( from );

break;
}
case 0x0032: // "*i must consider my sins*
{
from.SendMessage( "Short Term Murders : {0}", from.ShortTermMurders );
from.SendMessage( "Long Term Murders : {0}", from.Kills );
break;
}
}
}
}
}
}[/code:1]
 

CrazyJester

Wanderer
I just removed everything you commented out and didnt need because of it :p You need to post the error for anyone to be able to help you. You get warnings in every file anyways, runuo just hides the warnings when you dont get any errors. unless you're doing something wierd that every custom file depends on this file, warnings are caused by the file itself, and this being broken just makes you see them
 
Top