Macil

Initiate
So, I'm not entirely sure where to throw this post. It is a script pertaining a system someone on the RunUO forums released, but obviously I'm using ServUO and not RunUO. So I'm putting it here because I figured that's what everyone over there might say if I posted it there - either way...

I'm trying to use the TillermanGump system to get my Galleons to navigate (in addition to the mouse movement which I already have, because with the gump it helps steer ships much quicker in tight places in my opinion).

Originally I had a lot more errors but these are the last few I can't seem to knock out - I'm pretty sure it's something fairly simple but I can't seem to knock it out.

Code:
Errors:
 + Custom Systems/NewBoats/Boats/TillerMan.cs:
    CS0103: Line 39: The name 'm_Boat' does not exist in the current context
    CS0103: Line 41: The name 'm_Boat' does not exist in the current context
    CS0103: Line 43: The name 'm_Boat' does not exist in the current context
    CS0103: Line 45: The name 'm_Boat' does not exist in the current context
    CS0103: Line 49: The name 'm_Boat' does not exist in the current context
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.

TillerMan.cs:

Code:
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
using Server.Movement;
using Server.Network;
using Server.Multis;
using Server.Gumps;

namespace Server.Items
{
    public class NewTillerMan : BaseShipItem, IFacingChange
    {
        public NewTillerMan(NewBaseBoat boat, Point3D initOffset)
            : base(boat, 0x3E4E, initOffset)
        {
        }

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

        public void Say(int number)
        {
            if(!Transport.IsDriven)
                PublicOverheadMessage(MessageType.Regular, 0x3B2, number);
        }

        public void Say(int number, string args)
        {
            if (!Transport.IsDriven)
                PublicOverheadMessage(MessageType.Regular, 0x3B2, number, args);
        }

        public override void OnDoubleClick(Mobile from)
        {
            if ( m_Boat != null )
            {
                if( m_Boat.Owner == from || from.AccessLevel >= AccessLevel.Administrator )
                {
                    if( m_Boat.Contains( from ) )
                    {
                        from.SendGump( new TillerManGump( from, m_Boat, false ) ); //m_Boat.BeginRename( from );
                    }
                    else
                    {
                        m_Boat.BeginDryDock( from );
                    }
                }
                else from.SendLocalizedMessage( 501023 ); // You must be the owner to use this item
            }
        }

        public void SetFacing(Direction oldFacing, Direction newFacing)
        {
            switch (newFacing)
            {
                case Direction.South: SetItemIDOnSmooth(0x3E4B); break;
                case Direction.North: SetItemIDOnSmooth(0x3E4E); break;
                case Direction.West: SetItemIDOnSmooth(0x3E50); break;
                case Direction.East: SetItemIDOnSmooth(0x3E55); break;
            }

            if (oldFacing == Server.Direction.North)
            {
                SetLocationOnSmooth(new Point3D(X - 1, Y, Z));
            }
            else if (newFacing == Server.Direction.North)
            {
                switch (oldFacing)
                {
                    case Server.Direction.South: SetLocationOnSmooth(new Point3D(X - 1, Y, Z)); break;
                    case Server.Direction.East: SetLocationOnSmooth(new Point3D(X, Y + 1, Z)); break;
                    case Server.Direction.West: SetLocationOnSmooth(new Point3D(X, Y - 1, Z)); break;
                }
            }
        }

        #region Serialization
        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();
        }
        #endregion
    }
}
 
I've got this script installed and working. Your using the tillerman.cs script that was provided with the New Galleons scripts,. I recommend looking at the distro servuo tillerman.cs and making the necessary changes. You'll see m_Boat in the default script a bunch of times.
 
I've got the script working for the normal boats, and m_Boats works just fine in there. That's why I'm so confused here. :-/
 

Active Shards

Donations

Total amount
$50.00
Goal
$1,000.00
Back