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!

MyStats Gump

Phr3d13

Sorceror
I can't get the MyStats gump to compile correctly. Here is the error:
Code:
Errors:
+ Customs/StatsGump.cs:
    CS0117: Line 16: `Server.Commands.Properties' does not contain a definition for `Register'
and here is the snippet of code:
Rich (BB code):
using System;
using System.Collections;
using Server.Network;
using Server.Mobiles;
using Server.Items;
using Server.Misc;
using Server.Commands;
namespace Server.Gumps
{
    public class StatsGump : Gump
    {
public static void Initialize()
{
            CommandSystem.Prefix = "[";
Properties.Register();
Register( "mystats", AccessLevel.Player, new CommandEventHandler( MyStats_OnCommand ) );
        }

public static void Register( string command, AccessLevel access, CommandEventHandler handler )
{
            CommandSystem.Register(command, access, handler);
}
[Usage( "MyStats" )]
[Description( "Opens Stats Gump." )]
public static void MyStats_OnCommand( CommandEventArgs e )
{
Mobile from = e.Mobile;
from.CloseGump( typeof( StatsGump ) );
from.SendGump( new StatsGump( from ) );

        }
the error line is the red line
and i'm using the latest sa-project svn
 

irukandji

Squire
Try this instead:

Code:
        public static void Initialize()
        {
            CommandSystem.Register( "MyStats", AccessLevel.Player, new CommandEventHandler( MyStats_OnCommand ) );
    }
 
Top