Fisher

Member
I have been adding items to my craft menus and all of them work but these two.

Code:
Errors:
+ custom/DefCarpentry.cs:
    CS0246: Line 151: The type or namespace name 'PlantBowl' could not be found
(are you missing a using directive or an assembly reference?)
    CS0246: Line 805: The type or namespace name 'SmallBoatDeed' could not be fo
und (are you missing a using directive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

Here are the lines from my DefCarpentry:

Code:
			this.AddCraft(typeof(PlantBowl), 1044294, "Plant Bowl", 20.0, 60.0, typeof(Board), 1044041, 1, 1044351);
			
       
			
			#region Boats
			index = this.AddCraft(typeof(SmallBoatDeed), "Boats", "SmallBoatDeed", 60.0, 85.0, typeof(OakBoard), 1044041, 200, 1044351);
		    this.AddSkill(index, SkillName.Tinkering, 55.0, 60.0);
            this.AddRes(index, typeof(IronIngot), 1044036, 50, 1044037);
			this.AddSkill(index, SkillName.Tailoring, 55.0, 60.0);
            this.AddRes(index, typeof(Cloth), 1044286, 100, 1044287);
            this.ForceNonExceptional(index);
			
			#endregion


Thanks!
 
Basically it is telling you are missing a class with a constructor of those items. If you don't have the file to build them, it won't know how to build them.
 
This is from SmallBoat.cs
Code:
public class SmallBoatDeed : BaseBoatDeed
    {
        [Constructable]
        public SmallBoatDeed()
            : base(0x0, Point3D.Zero)
        {
        }

        public SmallBoatDeed(Serial serial)
            : base(serial)
        {
        }

        public override int LabelNumber
        {
            get
            {
                return 1041205;
            }
        }// small ship deed
        public override BaseBoat Boat
        {
            get
            {
                return new SmallBoat();
            }
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.Write((int)0);
        }
    }

and from PlantBowl.cs

Code:
public class PlantBowl : Item
    {
        private static readonly int[] m_DirtPatchTiles = new int[]
        {
            0x9, 0x15,
            0x71, 0x7C,
            0x82, 0xA7,
            0xDC, 0xE3,
            0xE8, 0xEB,
            0x141, 0x144,
            0x14C, 0x15C,
            0x169, 0x174,
            0x1DC, 0x1EF,
            0x272, 0x275,
            0x27E, 0x281,
            0x2D0, 0x2D7,
            0x2E5, 0x2FF,
            0x303, 0x31F,
            0x32C, 0x32F,
            0x33D, 0x340,
            0x345, 0x34C,
            0x355, 0x358,
            0x367, 0x36E,
            0x377, 0x37A,
            0x38D, 0x390,
            0x395, 0x39C,
            0x3A5, 0x3A8,
            0x3F6, 0x405,
            0x547, 0x54E,
            0x553, 0x556,
            0x597, 0x59E,
            0x623, 0x63A,
            0x6F3, 0x6FA,
            0x777, 0x791,
            0x79A, 0x7A9,
            0x7AE, 0x7B1,
            0x98C, 0x99F,
            0x9AC, 0x9BF,
            0x5B27, 0x5B3E,
            0x71F4, 0x71FB,
            0x72C9, 0x72CA,
        };
        [Constructable]
        public PlantBowl()
            : base(0x15FD)
        {
            this.Weight = 1.0;
        }

        public PlantBowl(Serial serial)
            : base(serial)
        {
        }

I have not modified either of these files.
 
Thinking there is only SmallDragonBoatDeed? I would also check the top of each script to see if you need to add a missing tag to the top
 
I added this to the top of DefCarpentry

Code:
using Server.Engines.Plants;
using Server.Multis;

and now everything is working as expected.
Thanks!!
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back