I'm in the process of updating a mass amount of old RUO 1.1 scripts and when I get the error "namespace name 'CommandEventArgs' could not be found" I'm supposed to put 'using Server.Commands;' because namespace Server.Scripts.Commands is outdated. But should I be placing 'using Server.Commands;' where where 'namespace Server.Scripts.commands;' is or should I put it under 'using System;' 'using Server;'

Code:
using Server;
using Server.Items;                <------Here?
using Server.Commands;

namespace Server.Scripts.Commands      <---------- Or here?
{
    public class CountShardGold
    {
        public static void Initialize()
        {
            Server.Commands.Register( "CountShardGold", AccessLevel.Administrator, new CommandEventHandler( CountShardGold_OnCommand ) );
        }

        [Usage( "CountShardGold" )]
        [Description( "Counts money on shard." )]
        private static void CountShardGold_OnCommand( CommandEventArgs e )
        {
            Mobile from = e.Mobile;
            if ( from == null  )
                return;

            long gold = 0;
            foreach( Item item in World.Items.Values )
            {
                if ( item is Gold )
                    gold += item.Amount;
                else if ( item is BankCheck )
                    gold += ((BankCheck)item).Worth;
            }

            from.SendMessage( "Gold on shard: {0}gp.", gold );
        }
    }
}


If I do put it under 'using Server;' then should I be replacing 'namespace Server.Scripts.Commands' with 'namespace Server.Misc' or something along those lines?
 

Thank you Milva for replying, I have been using that list off and on when I need but the CommandEventArgs part confuses me,(idk if i'm just dense) while updating these scripts i've ran into things like
Code:
using System;
using Server;

namespace Server.Scripts.Commands

and
Code:
using System;
using Server;
using Server.Scripts.Commands;

namespace Server.Misc

would the best option be to put something like
Code:
using System;
using Server;
using Server.Commands;

namespace Server.Misc

Or could I keep the 'namespace Server.Scripts.Commands' while adding 'using Server.Commands;' should I then change it to 'namespace Server.Commands'
Code:
using System;
using Server;
using Server.Commands

namespace Server.Commands
like this? or would this be redundant.
 
Back