Evanonian

Citizen
ServUO Version
Publish 58
Ultima Expansion
Endless Journey
I'm trying to take this old decoration generation command script and use it to generate my own custom decoration .cfg. I get this error on compile and I can't seem to figure it out.

Script:
Code:
using System;
using Server;
using System.IO;
using Server.Commands;
using Server.Items;
using Server.Mobiles;
using Server.Gumps;
using Server.Network;
using Server.Engines.Quests;
using System.Collections;
using System.Collections.Generic;

namespace Server.Commands
{
    public static class Magincia
    {
        public static void Initialize()
        {
            CommandSystem.Register("DecorateMagincia", AccessLevel.Administrator, new CommandEventHandler(DecorateMagincia_OnCommand));
            CommandSystem.Register("MaginciaDelete", AccessLevel.Administrator, new CommandEventHandler(MaginciaDelete_OnCommand));
        }

        [Usage("DecorateMagincia")]
        [Description("Generates Magincia.")]
        private static void DecorateMagincia_OnCommand(CommandEventArgs e)
        {
            e.Mobile.SendMessage("Generating Magincia, please wait.");

            Decorate.Generate("Data/Magincia/Trammel", Map.Trammel);
            Decorate.Generate("Data/Magincia/Felucca", Map.Felucca);

            e.Mobile.SendMessage("Magincia Decoration Complete.");
        }

        [Usage("MaginciaDelete")]
        [Description("Deletes Magincia world decoration.")]
        private static void MaginciaDelete_OnCommand(CommandEventArgs e)
        {
            e.Mobile.SendMessage("Deleting Magincia world decoration, please wait.");

            DecorateDelete.Generate("Data/Magincia/Trammel", Map.Trammel);
            DecorateDelete.Generate("Data/Magincia/Felucca", Map.Felucca);

            e.Mobile.SendMessage("Magincia world decoration deleting complete.");
        }

        private static Queue<Item> m_DeleteQueue = new Queue<Item>();

        public static bool FindItem(int x, int y, int z, Map map, Item test)
        {
            return FindItem(new Point3D(x, y, z), map, test);
        }

        public static bool FindItem(Point3D p, Map map, Item test)
        {
            bool result = false;

            IPooledEnumerable eable = map.GetItemsInRange(p);

            foreach (Item item in eable)
            {
                if (item.Z == p.Z && item.ItemID == test.ItemID)
                {
                    m_DeleteQueue.Enqueue(item);
                    result = true;
                }
            }

            eable.Free();

            while (m_DeleteQueue.Count > 0)
                m_DeleteQueue.Dequeue().Delete();

            return result;
        }
    }
}


Error:
Code:
C:\Servers\ServUO\Scripts\Custom\Decorate Magincia.cs(29,56): error CS1503: Argument 2: cannot convert from 'Server.Map
' to 'string' [C:\Servers\ServUO\Scripts\Scripts.csproj]
C:\Servers\ServUO\Scripts\Custom\Decorate Magincia.cs(30,56): error CS1503: Argument 2: cannot convert from 'Server.Map
' to 'string' [C:\Servers\ServUO\Scripts\Scripts.csproj]
 

arvoreen

Citizen
the error is not with DecorateDelete.Generate, it is with Decorate.Generate, which requires 3 parameters.