What am I doing wrong here? Just trying to add a new piece of clothing


C#:
using System;
using Server;

namespace Server.Items
{
    public class newshirtlol : BaseClothing
    {
        
        [Constructable]
        public newshirtlol : (0x558F)
        
        {
            Name = "<BASEFONT COLOR=#2E9AFE>newshirtlol";
            Hue = 1910;
    
                   Weight = 2.0;
        }

      

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

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

            writer.Write( (int) 1 );
        }
        
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

        }
    }
}
 
What error are you getting?

As far as I know you can't specify font information within an item's name...

I would look at other shirt scripts since they inherit Shirt and not baseclothing.

Here is shirt.cs edited for your needs:
Code:
using System;
using Server;

namespace Server.Items
{
    public class newshirtlol : Shirt
    {
        [Constructable]
        public newshirtlol()
        {
Name = "New shirt LOL";
Hue = 1910;
        }

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

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)0); // version
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            reader.ReadInt();
        }
    }
}

Did you know if you type the word "shirt" enough times, it ceases to have meaning?! :D
 
lol thanks :)

Heres the error

+ Custom/newshirtlol.cs:
CS1519: Line 10: Invalid token ':' in class, struct, or interface member declaration
CS1031: Line 10: Type expected
CS8124: Line 10: Tuple must contain at least two elements.
CS1026: Line 10: ) expected
CS1519: Line 10: Invalid token '0x558F' in class, struct, or interface member declaration
CS1519: Line 13: Invalid token '=' in class, struct, or interface member declaration
CS1519: Line 14: Invalid token '=' in class, struct, or interface member declaration
CS1519: Line 16: Invalid token '=' in class, struct, or interface member declaration
CS1022: Line 40: Type or namespace definition, or end-of-file expected
Scripts: One or more scripts failed to compile or no script files were found.
 
Falkor answer would not produce that error, but it would if you left your line like this

Code:
        public newshirtlol : (0x558F)

change to

Code:
public newshirtlol()
 
Code:
public newshirtlol()  : base (0x558F)

should take care of that. I forgot you were using a different shirt. You may have to change this line from Shirt to BaseShirt for that.

Code:
public class newshirtlol : BaseShirt
 
Back