Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 07-01-2006, 10:50 AM   #1 (permalink)
Forum Novice
 
Macil's Avatar
 
Join Date: Oct 2003
Location: Harper Woods, Michigan
Age: 21
Posts: 815
Send a message via ICQ to Macil Send a message via AIM to Macil
Default Problems Making Ships Craftable

I downloaded UOT's fireable cannon script and the scripts for his sinking ships. The cannon works great but I can't seem to get this boats working when I replace my default boats with them.

Fireable Cannon

I know UOT's thread is locked, so I'm not sure if I'm breaking rules or anything trying to get help for this here. No problem if I can't. I'm just not too good at understanding errors when I get them and what to do about it. Anywho, these would be the errors. If someone could help, I'd much appreciate it, it's a neat system.

Oh, and by the way, I downloaded RoninGT's government system and the whole reason I tried doing this with the boats is so the government system's architect tool lets players build the sinkable ships rather than the non sinkable ships. I figured it'd be easier to overwrite the default ships with the sinkable ones rather than learn how to add the sinkable ones to the list of things that can be built. I guess I was wrong... =(

FS Player Government System

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (32 errors, 0 warnings)
 - Error: Scripts\Multis\Boats\BaseBoat.cs: CS0246: (line 11, column 37) The typ
e or namespace name 'BaseBoat' could not be found (are you missing a using direc
tive or an assembly reference?)
 - Error: Scripts\Multis\Boats\BaseDockedBoat.cs: CS0246: (line 8, column 43) Th
e type or namespace name 'BaseDockedBoat' could not be found (are you missing a
using directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\TillerMan.cs: CS0246: (line 10, column 11) The ty
pe or namespace name 'BaseBoat' could not be found (are you missing a using dire
ctive or an assembly reference?)
 - Error: Scripts\Multis\Boats\TillerMan.cs: CS0246: (line 12, column 21) The ty
pe or namespace name 'BaseBoat' could not be found (are you missing a using dire
ctive or an assembly reference?)
 - Error: Scripts\Multis\Boats\SmallDragonBoat.cs: CS0246: (line 22, column 19)
The type or namespace name 'BaseDockedBoat' could not be found (are you missing
a using directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\SmallDragonBoat.cs: CS0246: (line 53, column 19)
The type or namespace name 'BaseBoat' could not be found (are you missing a usin
g directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\SmallDragonBoat.cs: CS0246: (line 81, column 19)
The type or namespace name 'BaseBoat' could not be found (are you missing a usin
g directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\SmallBoat.cs: CS0246: (line 22, column 19) The ty
pe or namespace name 'BaseDockedBoat' could not be found (are you missing a usin
g directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\SmallBoat.cs: CS0246: (line 53, column 19) The ty
pe or namespace name 'BaseBoat' could not be found (are you missing a using dire
ctive or an assembly reference?)
 - Error: Scripts\Multis\Boats\SmallBoat.cs: CS0246: (line 81, column 19) The ty
pe or namespace name 'BaseBoat' could not be found (are you missing a using dire
ctive or an assembly reference?)
 - Error: Scripts\Multis\Boats\RenameBoatPrompt.cs: CS0246: (line 9, column 11)
The type or namespace name 'BaseBoat' could not be found (are you missing a usin
g directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\RenameBoatPrompt.cs: CS0246: (line 11, column 28)
 The type or namespace name 'BaseBoat' could not be found (are you missing a usi
ng directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\Plank.cs: CS0246: (line 12, column 11) The type o
r namespace name 'BaseBoat' could not be found (are you missing a using directiv
e or an assembly reference?)
 - Error: Scripts\Multis\Boats\Plank.cs: CS0246: (line 19, column 17) The type o
r namespace name 'BaseBoat' could not be found (are you missing a using directiv
e or an assembly reference?)
 - Error: Scripts\Multis\Boats\Plank.cs: CS0246: (line 75, column 10) The type o
r namespace name 'BaseBoat' could not be found (are you missing a using directiv
e or an assembly reference?)
 - Error: Scripts\Multis\Boats\MediumDragonBoat.cs: CS0246: (line 22, column 19)
 The type or namespace name 'BaseDockedBoat' could not be found (are you missing
 a using directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\MediumDragonBoat.cs: CS0246: (line 53, column 19)
 The type or namespace name 'BaseBoat' could not be found (are you missing a usi
ng directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\MediumDragonBoat.cs: CS0246: (line 81, column 19)
 The type or namespace name 'BaseBoat' could not be found (are you missing a usi
ng directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\MediumBoat.cs: CS0246: (line 22, column 19) The t
ype or namespace name 'BaseDockedBoat' could not be found (are you missing a usi
ng directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\MediumBoat.cs: CS0246: (line 53, column 19) The t
ype or namespace name 'BaseBoat' could not be found (are you missing a using dir
ective or an assembly reference?)
 - Error: Scripts\Multis\Boats\MediumBoat.cs: CS0246: (line 81, column 19) The t
ype or namespace name 'BaseBoat' could not be found (are you missing a using dir
ective or an assembly reference?)
 - Error: Scripts\Multis\Boats\LargeDragonBoat.cs: CS0246: (line 22, column 19)
The type or namespace name 'BaseDockedBoat' could not be found (are you missing
a using directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\LargeDragonBoat.cs: CS0246: (line 53, column 19)
The type or namespace name 'BaseBoat' could not be found (are you missing a usin
g directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\LargeDragonBoat.cs: CS0246: (line 81, column 19)
The type or namespace name 'BaseBoat' could not be found (are you missing a usin
g directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\LargeBoat.cs: CS0246: (line 22, column 19) The ty
pe or namespace name 'BaseDockedBoat' could not be found (are you missing a usin
g directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\LargeBoat.cs: CS0246: (line 53, column 19) The ty
pe or namespace name 'BaseBoat' could not be found (are you missing a using dire
ctive or an assembly reference?)
 - Error: Scripts\Multis\Boats\LargeBoat.cs: CS0246: (line 81, column 19) The ty
pe or namespace name 'BaseBoat' could not be found (are you missing a using dire
ctive or an assembly reference?)
 - Error: Scripts\Multis\Boats\Hold.cs: CS0246: (line 9, column 11) The type or
namespace name 'BaseBoat' could not be found (are you missing a using directive
or an assembly reference?)
 - Error: Scripts\Multis\Boats\Hold.cs: CS0246: (line 19, column 16) The type or
 namespace name 'BaseBoat' could not be found (are you missing a using directive
 or an assembly reference?)
 - Error: Scripts\Multis\Boats\ConfirmDryDockGump.cs: CS0246: (line 11, column 1
1) The type or namespace name 'BaseBoat' could not be found (are you missing a u
sing directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\ConfirmDryDockGump.cs: CS0246: (line 13, column 4
3) The type or namespace name 'BaseBoat' could not be found (are you missing a u
sing directive or an assembly reference?)
 - Error: Scripts\Multis\Boats\BaseBoatDeed.cs: CS0246: (line 79, column 19) The
 type or namespace name 'BaseBoat' could not be found (are you missing a using d
irective 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.
Macil is offline   Reply With Quote
Old 07-01-2006, 11:06 AM   #2 (permalink)
Forum Novice
 
Macil's Avatar
 
Join Date: Oct 2003
Location: Harper Woods, Michigan
Age: 21
Posts: 815
Send a message via ICQ to Macil Send a message via AIM to Macil
Default

Scratch all that. I'm a retard. I renamed all the lines in the scripts that said boatcd in them to just plain boat. That cleared up a zillion errors. I guess I wasn't thinking straight on that one. Anywho, I have this error I've been playing around for the past 10 minutes with that I can't seem to get to go away.

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
 - Error: Scripts\Multis\Boats\BaseBoat.cs: CS0146: (line 11, column 24) Circula
r base class definition between 'Server.Multis.BaseBoat' and 'Server.Multis.Base
Boat'
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
This is the script:

Code:
using System;
using System.Collections;
using Server;
using Server.Misc;
using Server.Items;
using Server.Network;
using Server.ContextMenus;

namespace Server.Multis
{
	public abstract class BaseBoat: BaseBoat, ICannonDamage, ICannonRepair
	{
		#region ICannonDamage vars
		private int m_Hits;
		private int m_HitsMax;
		
		[CommandProperty( AccessLevel.GameMaster )]
		public int Hits
		{
			get{ return m_Hits; }
			set
			{
				if ( value > m_HitsMax )
					m_Hits = m_HitsMax;
				else
					m_Hits = value;
				InvalidateProperties();
			}
		}
		
		[CommandProperty( AccessLevel.GameMaster )]
		public int HitsMax{ get{ return m_HitsMax; } set{ m_HitsMax = value; } }
		#endregion
		
		#region ICannonRepair vars
		public double MinReqSkill { get{ return 80; } }
		public SkillName RepairSkill { get{ return SkillName.Carpentry; } }
		#endregion
		
		#region ICannonDamage methods
		public void Damage( Mobile from, int damage )
		{
			bool candamage = true;
			if( Owner != null )
			{
				candamage = from.CanBeHarmful(Owner,false);
			}
			if( candamage )
			{
				m_Hits -= damage;
				bool newPacket = ( from.NetState.Version != null && from.NetState.Version >= DamagePacket.Version );
				if( newPacket )
					from.Send( new DamagePacket(from,damage) );
				else
					from.Send( new DamagePacketOld(from,damage) );
				OnDamaged();
			}
			InvalidateProperties();
		}
		
		public void OnDamaged()
		{
			if ( m_Hits <= 0 )
			{
				m_Hits = 0;
				if( m_SinkTimer == null )
				{
					m_SinkTimer = new SinkTimer( this );
					m_SinkTimer.Start();
					Sinking = true;
				}
			}
		}
		#endregion
		
		#region ICannonRepair methods
		public bool Repair( Mobile from )
		{
			if( m_Hits >= m_HitsMax )
			{
				from.SendLocalizedMessage( 1044281 ); // That item is in full repair
				return false;
			}
			double skill = from.Skills[RepairSkill].Value - MinReqSkill;
			if ( skill < 0 )
			{
				from.SendLocalizedMessage( 1044153 ); // You don't have the required skills to attempt this item.
				return false;
			}
			if ( from.Backpack.GetAmount( typeof( Board ) ) < 20 )
			{
				from.SendMessage("You lack the boards required to repair this.");
				return false;
			}
			bool failed = ( Utility.RandomDouble() > (skill / 50 + 0.3) );
			if ( failed )
			{
				from.SendLocalizedMessage( 1044280 ); // You fail to repair the item.
				from.Backpack.ConsumeTotal( typeof( Board ), Utility.Random(5) );
				return false;
			}
			if ( from.Backpack.ConsumeTotal( typeof( Board ), 20 ) )
			{
				int rep = 20 + Utility.Random((int)(skill));
				Hits += rep;
				from.SendLocalizedMessage( 1044279 ); // You repair the item.
				InvalidateProperties();
				return true;
			}
			return false;
		}
		#endregion
		private SinkTimer m_SinkTimer;
		private bool Sinking;
		
		private class SinkTimer : Timer
		{
			private BaseBoat m_Boat;
			private int m_Count;
			
			public SinkTimer( BaseBoat boat ) : base( TimeSpan.FromSeconds( 1.0 ), TimeSpan.FromSeconds( 2.0 ) )
			{
				m_Boat = boat;
				Priority = TimerPriority.OneSecond;
			}
			
			protected override void OnTick()
			{
				if( m_Count == 1 )
					m_Boat.OnSink(true);
				if ( m_Count == 5 )
				{
					m_Boat.Delete();
					Stop();
				}
				else
				{
					m_Boat.Location = new Point3D( m_Boat.X, m_Boat.Y, m_Boat.Z - 1 );
					
					if ( m_Boat.TillerMan != null && Utility.RandomBool() )
						m_Boat.TillerMan.Say( 1007168 + m_Count );
					
					++m_Count;
				}
			}
		}
		
		public void OnSink(bool secondPass)
		{
			IPooledEnumerable IPE = Map.GetMobilesInRange(Location,HoldDistance);
			ArrayList list = new ArrayList();
			foreach( Mobile m in IPE )
			{
				Console.WriteLine("Mobile = {0}", m);
				list.Add(m);
			}
			IPE.Free();
			foreach( Mobile m in list )
			{
				if( Contains(m.X,m.Y) )
					Strandedness.EventSink_Login( new LoginEventArgs(m) );
			}
			list.Clear();
			list = null;
			IPE = null;
			if( secondPass )
				OnSink(false);
		}
		
		public override bool ForceShowProperties{ get{return true;} }
		
		public override void AddNameProperty( ObjectPropertyList list )
		{
			if( ShipName != null )
				list.Add(ShipName);
		}
		
		public override void GetProperties( ObjectPropertyList list )
		{
			base.GetProperties( list );
			list.Add( 1060658, "#{0}\t{1}", "1049578", m_Hits ); // ~1_val~: ~2_val~
		}
		
		public BaseBoat() : base()
		{
		}
		
		
		public override void GetContextMenuEntries( Mobile from, ArrayList list )
		{
			base.GetContextMenuEntries( from, list );
			if ( (from == Owner || from.AccessLevel >= AccessLevel.GameMaster) && from.Alive )
			{
				list.Add( new Fix( this ) );
			}
		}
		
		private class Fix : ContextMenuEntry
		{
			private BaseBoat m_boat;
			
			public Fix( BaseBoat boat ) : base( 2014, 3 )
			{
				m_boat = boat;
			}
			
			public override void OnClick()
			{
				if ( !Owner.From.InRange( m_boat, 3 ) )
				{
					Owner.From.SendLocalizedMessage( 500446 );
				}
				else
				{
					m_boat.Repair(Owner.From);
				}
			}
			
		}
		
		public BaseBoat( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
			writer.Write( m_HitsMax );
			writer.Write( m_Hits );
			writer.Write( Sinking );
		}
		
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
			m_HitsMax = reader.ReadInt();
			m_Hits = reader.ReadInt();
			if( reader.ReadBool() )
			{
				m_SinkTimer = new SinkTimer( this );
				m_SinkTimer.Start();
				Sinking = true;
			}
		}
	}
}

Last edited by Macil; 07-01-2006 at 11:12 AM.
Macil is offline   Reply With Quote
Old 07-02-2006, 02:09 AM   #3 (permalink)
Forum Novice
 
Macil's Avatar
 
Join Date: Oct 2003
Location: Harper Woods, Michigan
Age: 21
Posts: 815
Send a message via ICQ to Macil Send a message via AIM to Macil
Default

Did I say something wrong? I don't mean to sound impatient, but I do seem to be in quite a pickle here. Not being able to play on my shard and all while these errors are being given.
Macil is offline   Reply With Quote
Old 07-02-2006, 02:16 AM   #4 (permalink)
Forum Expert
 
Join Date: Sep 2004
Age: 31
Posts: 677
Default

Not a great expert on this area of scripting, but from what I can tell, you seem to be trying to declare the abstract class "BaseBoat" by telling it to look up "BaseBoat". Not really sure what you should put there, actually. Not really informative, I know, but heh.. figured you could at least get one response.
__________________
Please don't preach to me. You won't convert me. You won't convince me. I am me and you are you. I will respect you because that's who I am. Disrespect me, and you've only proven who you really are.
Vhaerun is offline   Reply With Quote
Old 07-02-2006, 10:12 AM   #5 (permalink)
Forum Novice
 
Macil's Avatar
 
Join Date: Oct 2003
Location: Harper Woods, Michigan
Age: 21
Posts: 815
Send a message via ICQ to Macil Send a message via AIM to Macil
Default

My friend is a pretty good scripter, he's going to try rewriting it. *Sigh* Could take a while though.
Macil is offline   Reply With Quote
Old 07-02-2006, 10:21 AM   #6 (permalink)
Forum Novice
 
Mideon's Avatar
 
Join Date: May 2005
Location: Canada
Age: 24
Posts: 543
Default

Code:
namespace Server.Multis
{
	public abstract class BaseBoat: BaseBoat, ICannonDamage, ICannonRepair
	{
		#region ICannonDamage vars
		private int m_Hits;
		private int m_HitsMax;
Pretty sure your problem is highlighted in red. A Class can not inherit from itself...

Try removing the second BaseBoat....to give...

Code:
namespace Server.Multis
{
	public abstract class BaseBoat:ICannonDamage, ICannonRepair
	{
		#region ICannonDamage vars
		private int m_Hits;
		private int m_HitsMax;
That should clear it up. The circular issue was likely due to the class inheriting from itself....which then inherits from itself...and so and and so on.
__________________
A sense of community is the lifeblood of RunUO.
http://www.runuo.com/forums/announcements/67400-something-all-you-chew.html

Satire, man's greatest weapon (Flame Wars!)

The darkness is patient and in the end it always wins...but even the smallest light can overcome the blackest shadow.
Mideon is offline   Reply With Quote
Old 07-03-2006, 10:25 AM   #7 (permalink)
Forum Novice
 
Macil's Avatar
 
Join Date: Oct 2003
Location: Harper Woods, Michigan
Age: 21
Posts: 815
Send a message via ICQ to Macil Send a message via AIM to Macil
Default

Changing that line gives me a few errors...

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 36918
Scripts: Compiling C# scripts...failed (66 errors, 0 warnings)
 - Error: Scripts\Multis\Boats\BaseBoat.cs: CS0115: (line 170, column 24) 'Serve
r.Multis.BaseBoat.ForceShowProperties': no suitable method found to override
 - Error: Scripts\Multis\Boats\BaseBoat.cs: CS0115: (line 172, column 24) 'Serve
r.Multis.BaseBoat.AddNameProperty(Server.ObjectPropertyList)': no suitable metho
d found to override
 - Error: Scripts\Multis\Boats\BaseBoat.cs: CS0115: (line 178, column 24) 'Serve
r.Multis.BaseBoat.GetProperties(Server.ObjectPropertyList)': no suitable method
found to override
 - Error: Scripts\Multis\Boats\BaseBoat.cs: CS0115: (line 189, column 24) 'Serve
r.Multis.BaseBoat.GetContextMenuEntries(Server.Mobile, System.Collections.ArrayL
ist)': no suitable method found to override
 - Error: Scripts\Multis\Boats\BaseBoat.cs: CS0115: (line 225, column 24) 'Serve
r.Multis.BaseBoat.Serialize(Server.GenericWriter)': no suitable method found to
override
 - Error: Scripts\Multis\Boats\BaseBoat.cs: CS0115: (line 235, column 24) 'Serve
r.Multis.BaseBoat.Deserialize(Server.GenericReader)': no suitable method found t
o override
 - Error: Scripts\Multis\Boats\LargeBoat.cs: CS0115: (line 9, column 23) 'Server
.Multis.LargeBoat.NorthID': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeBoat.cs: CS0115: (line 10, column 24) 'Serve
r.Multis.LargeBoat.EastID': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeBoat.cs: CS0115: (line 11, column 23) 'Serve
r.Multis.LargeBoat.SouthID': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeBoat.cs: CS0115: (line 12, column 24) 'Serve
r.Multis.LargeBoat.WestID': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeBoat.cs: CS0115: (line 14, column 23) 'Serve
r.Multis.LargeBoat.HoldDistance': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeBoat.cs: CS0115: (line 15, column 23) 'Serve
r.Multis.LargeBoat.TillerManDistance': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeBoat.cs: CS0115: (line 17, column 27) 'Serve
r.Multis.LargeBoat.StarboardOffset': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeBoat.cs: CS0115: (line 18, column 32) 'Serve
r.Multis.LargeBoat.PortOffset': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeBoat.cs: CS0115: (line 20, column 27) 'Serve
r.Multis.LargeBoat.MarkOffset': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeBoat.cs: CS0115: (line 22, column 34) 'Serve
r.Multis.LargeBoat.DockedBoat': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeDragonBoat.cs: CS0115: (line 9, column 23) '
Server.Multis.LargeDragonBoat.NorthID': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeDragonBoat.cs: CS0115: (line 10, column 24)
'Server.Multis.LargeDragonBoat.EastID': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeDragonBoat.cs: CS0115: (line 11, column 23)
'Server.Multis.LargeDragonBoat.SouthID': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeDragonBoat.cs: CS0115: (line 12, column 24)
'Server.Multis.LargeDragonBoat.WestID': no suitable method found to override
 - Error: Scripts\Multis\Boats\LargeDragonBoat.cs: CS0115: (line 14, column 23)
'Server.Multis.LargeDragonBoat.HoldDistance': no suitable method found to overri
de
 - Error: Scripts\Multis\Boats\LargeDragonBoat.cs: CS0115: (line 15, column 23)
'Server.Multis.LargeDragonBoat.TillerManDistance': no suitable method found to o
verride
 - Error: Scripts\Multis\Boats\LargeDragonBoat.cs: CS0115: (line 17, column 27)
'Server.Multis.LargeDragonBoat.StarboardOffset': no suitable method found to ove
rride
 - Error: Scripts\Multis\Boats\LargeDragonBoat.cs: CS0115: (line 18, column 32)
'Server.Multis.LargeDragonBoat.PortOffset': no suitable method found to override

 - Error: Scripts\Multis\Boats\LargeDragonBoat.cs: CS0115: (line 20, column 27)
'Server.Multis.LargeDragonBoat.MarkOffset': no suitable method found to override

 - Error: Scripts\Multis\Boats\LargeDragonBoat.cs: CS0115: (line 22, column 34)
'Server.Multis.LargeDragonBoat.DockedBoat': no suitable method found to override

 - Error: Scripts\Multis\Boats\MediumBoat.cs: CS0115: (line 9, column 23) 'Serve
r.Multis.MediumBoat.NorthID': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumBoat.cs: CS0115: (line 10, column 24) 'Serv
er.Multis.MediumBoat.EastID': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumBoat.cs: CS0115: (line 11, column 23) 'Serv
er.Multis.MediumBoat.SouthID': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumBoat.cs: CS0115: (line 12, column 24) 'Serv
er.Multis.MediumBoat.WestID': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumBoat.cs: CS0115: (line 14, column 23) 'Serv
er.Multis.MediumBoat.HoldDistance': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumBoat.cs: CS0115: (line 15, column 23) 'Serv
er.Multis.MediumBoat.TillerManDistance': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumBoat.cs: CS0115: (line 17, column 27) 'Serv
er.Multis.MediumBoat.StarboardOffset': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumBoat.cs: CS0115: (line 18, column 32) 'Serv
er.Multis.MediumBoat.PortOffset': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumBoat.cs: CS0115: (line 20, column 27) 'Serv
er.Multis.MediumBoat.MarkOffset': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumBoat.cs: CS0115: (line 22, column 34) 'Serv
er.Multis.MediumBoat.DockedBoat': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumDragonBoat.cs: CS0115: (line 9, column 23)
'Server.Multis.MediumDragonBoat.NorthID': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumDragonBoat.cs: CS0115: (line 10, column 24)
 'Server.Multis.MediumDragonBoat.EastID': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumDragonBoat.cs: CS0115: (line 11, column 23)
 'Server.Multis.MediumDragonBoat.SouthID': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumDragonBoat.cs: CS0115: (line 12, column 24)
 'Server.Multis.MediumDragonBoat.WestID': no suitable method found to override
 - Error: Scripts\Multis\Boats\MediumDragonBoat.cs: CS0115: (line 14, column 23)
 'Server.Multis.MediumDragonBoat.HoldDistance': no suitable method found to over
ride
 - Error: Scripts\Multis\Boats\MediumDragonBoat.cs: CS0115: (line 15, column 23)
 'Server.Multis.MediumDragonBoat.TillerManDistance': no suitable method found to
 override
 - Error: Scripts\Multis\Boats\MediumDragonBoat.cs: CS0115: (line 17, column 27)
 'Server.Multis.MediumDragonBoat.StarboardOffset': no suitable method found to o
verride
 - Error: Scripts\Multis\Boats\MediumDragonBoat.cs: CS0115: (line 18, column 32)
 'Server.Multis.MediumDragonBoat.PortOffset': no suitable method found to overri
de
 - Error: Scripts\Multis\Boats\MediumDragonBoat.cs: CS0115: (line 20, column 27)
 'Server.Multis.MediumDragonBoat.MarkOffset': no suitable method found to overri
de
 - Error: Scripts\Multis\Boats\MediumDragonBoat.cs: CS0115: (line 22, column 34)
 'Server.Multis.MediumDragonBoat.DockedBoat': no suitable method found to overri
de
 - Error: Scripts\Multis\Boats\SmallBoat.cs: CS0115: (line 9, column 23) 'Server
.Multis.SmallBoat.NorthID': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallBoat.cs: CS0115: (line 10, column 24) 'Serve
r.Multis.SmallBoat.EastID': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallBoat.cs: CS0115: (line 11, column 23) 'Serve
r.Multis.SmallBoat.SouthID': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallBoat.cs: CS0115: (line 12, column 24) 'Serve
r.Multis.SmallBoat.WestID': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallBoat.cs: CS0115: (line 14, column 23) 'Serve
r.Multis.SmallBoat.HoldDistance': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallBoat.cs: CS0115: (line 15, column 23) 'Serve
r.Multis.SmallBoat.TillerManDistance': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallBoat.cs: CS0115: (line 17, column 27) 'Serve
r.Multis.SmallBoat.StarboardOffset': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallBoat.cs: CS0115: (line 18, column 32) 'Serve
r.Multis.SmallBoat.PortOffset': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallBoat.cs: CS0115: (line 20, column 27) 'Serve
r.Multis.SmallBoat.MarkOffset': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallBoat.cs: CS0115: (line 22, column 34) 'Serve
r.Multis.SmallBoat.DockedBoat': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallDragonBoat.cs: CS0115: (line 9, column 23) '
Server.Multis.SmallDragonBoat.NorthID': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallDragonBoat.cs: CS0115: (line 10, column 24)
'Server.Multis.SmallDragonBoat.EastID': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallDragonBoat.cs: CS0115: (line 11, column 23)
'Server.Multis.SmallDragonBoat.SouthID': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallDragonBoat.cs: CS0115: (line 12, column 24)
'Server.Multis.SmallDragonBoat.WestID': no suitable method found to override
 - Error: Scripts\Multis\Boats\SmallDragonBoat.cs: CS0115: (line 14, column 23)
'Server.Multis.SmallDragonBoat.HoldDistance': no suitable method found to overri
de
 - Error: Scripts\Multis\Boats\SmallDragonBoat.cs: CS0115: (line 15, column 23)
'Server.Multis.SmallDragonBoat.TillerManDistance': no suitable method found to o
verride
 - Error: Scripts\Multis\Boats\SmallDragonBoat.cs: CS0115: (line 17, column 27)
'Server.Multis.SmallDragonBoat.StarboardOffset': no suitable method found to ove
rride
 - Error: Scripts\Multis\Boats\SmallDragonBoat.cs: CS0115: (line 18, column 32)
'Server.Multis.SmallDragonBoat.PortOffset': no suitable method found to override

 - Error: Scripts\Multis\Boats\SmallDragonBoat.cs: CS0115: (line 20, column 27)
'Server.Multis.SmallDragonBoat.MarkOffset': no suitable method found to override

 - Error: Scripts\Multis\Boats\SmallDragonBoat.cs: CS0115: (line 22, column 34)
'Server.Multis.SmallDragonBoat.DockedBoat': no suitable method found to override

Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
My code now looks like this;

Code:
using System;
using System.Collections;
using Server;
using Server.Misc;
using Server.Items;
using Server.Network;
using Server.ContextMenus;

namespace Server.Multis
{
	public abstract class BaseBoat:ICannonDamage, ICannonRepair
	{
		#region ICannonDamage vars
		private int m_Hits;
		private int m_HitsMax;
		
		[CommandProperty( AccessLevel.GameMaster )]
		public int Hits
		{
			get{ return m_Hits; }
			set
			{
				if ( value > m_HitsMax )
					m_Hits = m_HitsMax;
				else
					m_Hits = value;
				InvalidateProperties();
			}
		}
		
		[CommandProperty( AccessLevel.GameMaster )]
		public int HitsMax{ get{ return m_HitsMax; } set{ m_HitsMax = value; } }
		#endregion
		
		#region ICannonRepair vars
		public double MinReqSkill { get{ return 80; } }
		public SkillName RepairSkill { get{ return SkillName.Carpentry; } }
		#endregion
		
		#region ICannonDamage methods
		public void Damage( Mobile from, int damage )
		{
			bool candamage = true;
			if( Owner != null )
			{
				candamage = from.CanBeHarmful(Owner,false);
			}
			if( candamage )
			{
				m_Hits -= damage;
				bool newPacket = ( from.NetState.Version != null && from.NetState.Version >= DamagePacket.Version );
				if( newPacket )
					from.Send( new DamagePacket(from,damage) );
				else
					from.Send( new DamagePacketOld(from,damage) );
				OnDamaged();
			}
			InvalidateProperties();
		}
		
		public void OnDamaged()
		{
			if ( m_Hits <= 0 )
			{
				m_Hits = 0;
				if( m_SinkTimer == null )
				{
					m_SinkTimer = new SinkTimer( this );
					m_SinkTimer.Start();
					Sinking = true;
				}
			}
		}
		#endregion
		
		#region ICannonRepair methods
		public bool Repair( Mobile from )
		{
			if( m_Hits >= m_HitsMax )
			{
				from.SendLocalizedMessage( 1044281 ); // That item is in full repair
				return false;
			}
			double skill = from.Skills[RepairSkill].Value - MinReqSkill;
			if ( skill < 0 )
			{
				from.SendLocalizedMessage( 1044153 ); // You don't have the required skills to attempt this item.
				return false;
			}
			if ( from.Backpack.GetAmount( typeof( Board ) ) < 20 )
			{
				from.SendMessage("You lack the boards required to repair this.");
				return false;
			}
			bool failed = ( Utility.RandomDouble() > (skill / 50 + 0.3) );
			if ( failed )
			{
				from.SendLocalizedMessage( 1044280 ); // You fail to repair the item.
				from.Backpack.ConsumeTotal( typeof( Board ), Utility.Random(5) );
				return false;
			}
			if ( from.Backpack.ConsumeTotal( typeof( Board ), 20 ) )
			{
				int rep = 20 + Utility.Random((int)(skill));
				Hits += rep;
				from.SendLocalizedMessage( 1044279 ); // You repair the item.
				InvalidateProperties();
				return true;
			}
			return false;
		}
		#endregion
		private SinkTimer m_SinkTimer;
		private bool Sinking;
		
		private class SinkTimer : Timer
		{
			private BaseBoat m_Boat;
			private int m_Count;
			
			public SinkTimer( BaseBoat boat ) : base( TimeSpan.FromSeconds( 1.0 ), TimeSpan.FromSeconds( 2.0 ) )
			{
				m_Boat = boat;
				Priority = TimerPriority.OneSecond;
			}
			
			protected override void OnTick()
			{
				if( m_Count == 1 )
					m_Boat.OnSink(true);
				if ( m_Count == 5 )
				{
					m_Boat.Delete();
					Stop();
				}
				else
				{
					m_Boat.Location = new Point3D( m_Boat.X, m_Boat.Y, m_Boat.Z - 1 );
					
					if ( m_Boat.TillerMan != null && Utility.RandomBool() )
						m_Boat.TillerMan.Say( 1007168 + m_Count );
					
					++m_Count;
				}
			}
		}
		
		public void OnSink(bool secondPass)
		{
			IPooledEnumerable IPE = Map.GetMobilesInRange(Location,HoldDistance);
			ArrayList list = new ArrayList();
			foreach( Mobile m in IPE )
			{
				Console.WriteLine("Mobile = {0}", m);
				list.Add(m);
			}
			IPE.Free();
			foreach( Mobile m in list )
			{
				if( Contains(m.X,m.Y) )
					Strandedness.EventSink_Login( new LoginEventArgs(m) );
			}
			list.Clear();
			list = null;
			IPE = null;
			if( secondPass )
				OnSink(false);
		}
		
		public override bool ForceShowProperties{ get{return true;} }
		
		public override void AddNameProperty( ObjectPropertyList list )
		{
			if( ShipName != null )
				list.Add(ShipName);
		}
		
		public override void GetProperties( ObjectPropertyList list )
		{
			base.GetProperties( list );
			list.Add( 1060658, "#{0}\t{1}", "1049578", m_Hits ); // ~1_val~: ~2_val~
		}
		
		public BaseBoat() : base()
		{
		}
		
		
		public override void GetContextMenuEntries( Mobile from, ArrayList list )
		{
			base.GetContextMenuEntries( from, list );
			if ( (from == Owner || from.AccessLevel >= AccessLevel.GameMaster) && from.Alive )
			{
				list.Add( new Fix( this ) );
			}
		}
		
		private class Fix : ContextMenuEntry
		{
			private BaseBoat m_boat;
			
			public Fix( BaseBoat boat ) : base( 2014, 3 )
			{
				m_boat = boat;
			}
			
			public override void OnClick()
			{
				if ( !Owner.From.InRange( m_boat, 3 ) )
				{
					Owner.From.SendLocalizedMessage( 500446 );
				}
				else
				{
					m_boat.Repair(Owner.From);
				}
			}
			
		}
		
		public BaseBoat( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
			writer.Write( m_HitsMax );
			writer.Write( m_Hits );
			writer.Write( Sinking );
		}
		
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
			m_HitsMax = reader.ReadInt();
			m_Hits = reader.ReadInt();
			if( reader.ReadBool() )
			{
				m_SinkTimer = new SinkTimer( this );
				m_SinkTimer.Start();
				Sinking = true;
			}
		}
	}
}
Maybe I added something wrong?
Macil is offline   Reply With Quote
Old 07-03-2006, 04:25 PM   #8 (permalink)
Forum Novice
 
Mideon's Avatar
 
Join Date: May 2005
Location: Canada
Age: 24
Posts: 543
Default

Ah Okay...what you'll have to do is....use your current boat script to extend from the original BaseBoat...so name your current Class ExtendedBoat or something and have it inherit from BaseBoat (the orig one).

Then you will have to edit your boat scripts to inherit from ExtendedBoat instead of from BaseBoat, that should fix your problem. Either that or find a way to merge the old BaseBoat with the new changes found in your current one.
__________________
A sense of community is the lifeblood of RunUO.
http://www.runuo.com/forums/showthread.php?t=67400

Satire, man's greatest weapon (Flame Wars!)

The darkness is patient and in the end it always wins...but even the smallest light can overcome the blackest shadow.
Mideon is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5