ok...here is what my server errors are concerning the parrot:
RunUO - [
www.runuo.com] Version 2.0, Build 2959.20979
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
+ CUSTOM/Parrot.cs:
CS0117: Line 79: 'Server.Items.ParrotPerchAddon' does not contain a definiti
on for 'Parrot'
CS0117: Line 79: 'Server.Items.ParrotPerchAddon' does not contain a definiti
on for 'Parrot'
CS0246: Line 81: The type or namespace name 'PetParrot' could not be found (
are you missing a using directive or an assembly reference?)
CS0117: Line 86: 'Server.Items.ParrotPerchAddon' does not contain a definiti
on for 'Parrot'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
And the Parrot.cs //i added a lot of using statements to see if it'd work
Code:
using System;
using Server;
using Server.Items;
using Server.Network;
using Server.Mobiles;
using Server.Multis;
using Server.Targeting;
namespace Server.Items
{
public class ParrotItem : Item
{
public override int LabelNumber{ get{ return 1074281; } } // pet parrot
private static int[] m_Hues = new int[]
{
0x3, 0xD, 0x13, 0x1C, 0x21, 0x30, 0x3F, 0x44, 0x59, 0x62, 0x71
};
[Constructable]
public ParrotItem() : base( 0x20EE )
{
Weight = 1;
Hue = Utility.RandomList( m_Hues );
}
public ParrotItem( Serial serial ) : base( serial )
{
}
public override void OnDoubleClick( Mobile from )
{
if ( IsChildOf ( from.Backpack ) )
{
from.Target = new InternalTarget( this );
from.SendLocalizedMessage( 1072612 ); // Target the Parrot Perch you wish to place this Parrot upon.
}
else
from.SendLocalizedMessage( 1042004 ); // That must be in your pack for you to use it.
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
public class InternalTarget : Target
{
private ParrotItem m_Parrot;
public InternalTarget( ParrotItem parrot ) : base( 2, false, TargetFlags.None )
{
m_Parrot = parrot;
}
protected override void OnTarget( Mobile from, object targeted )
{
if ( targeted is AddonComponent )
{
AddonComponent component = (AddonComponent) targeted;
if ( component.Addon is ParrotPerchAddon )
{
ParrotPerchAddon perch = (ParrotPerchAddon) component.Addon;
BaseHouse house = BaseHouse.FindHouseAt( perch );
if ( house != null && house.IsCoOwner( from ) )
{
if ( perch.Parrot == null || perch.Parrot.Deleted )
{
Parrot parrot = new PetParrot();
parrot.Hue = m_Parrot.Hue;
parrot.MoveToWorld( perch.Location, perch.Map );
parrot.Z += 12;
perch.Parrot = parrot;
m_Parrot.Delete();
}
else
from.SendLocalizedMessage( 1072616 ); //That Parrot Perch already has a Parrot.
}
else
from.SendLocalizedMessage( 1072618 ); //Parrots can only be placed on Parrot Perches in houses where you are an owner or co-owner.
}
else
from.SendLocalizedMessage( 1072614 ); //You must place the Parrot on a Parrot Perch.
}
else
from.SendLocalizedMessage( 1072614 ); //You must place the Parrot on a Parrot Perch.
}
protected override void OnTargetOutOfRange( Mobile from, object targeted )
{
base.OnTargetOutOfRange( from, targeted );
from.SendLocalizedMessage( 1072613 ); //You must be closer to the Parrot Perch to place the Parrot upon it.
}
}
}
}
and the perchaddon:
Code:
using System;
using Server;
using Server.Items;
namespace Server.Items
{
public class ParrotPerchAddon : BaseAddon
{
public override BaseAddonDeed Deed{ get{ return new ParrotPerchDeed(); } }
[Constructable]
public ParrotPerchAddon()
{
AddComponent( new AddonComponent( 0x2FF4 ), 0, 0, 0 );
}
public ParrotPerchAddon( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
public class ParrotPerchDeed : BaseAddonDeed
{
public override BaseAddon Addon{ get{ return new ParrotPerchAddon(); } }
public override int LabelNumber{ get{ return 1072617; } } // parrot perch
[Constructable]
public ParrotPerchDeed()
{
}
public ParrotPerchDeed( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}
I can't run my server unless i get these fixed, please help....(i could take the scripts out i guess), but would really like to make them work