Go Back   RunUO - Ultima Online Emulation > RunUO > Script Support

Script Support Get support for modifying RunUO Scripts, or writing your own!

Reply
 
Thread Tools Display Modes
Old 01-11-2007, 12:12 AM   #1 (permalink)
Forum Novice
 
Ki Frost's Avatar
 
Join Date: Dec 2005
Age: 19
Posts: 743
Send a message via ICQ to Ki Frost Send a message via MSN to Ki Frost
Default Carpet Addon Update

Error:
Quote:
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
+ Customs/CarpetAddon/CarpetAddonDeed.cs:
CS1502: Line 157: The best overloaded method match for 'Server.Items.BaseAdd
on.CouldFit(Server.IPoint3D, Server.Map, Server.Mobile, ref Server.Multis.BaseHo
use)' has some invalid arguments
CS1503: Line 157: Argument '4': cannot convert from 'ref System.Collections.
Generic.List<Server.Multis.BaseHouse>' to 'ref Server.Multis.BaseHouse'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
Code:
Code:
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            Mobile from = sender.Mobile;

            if (info.ButtonID >= 1)
            {
                BaseAddon addon = new CarpetAddon(info.ButtonID - 1, m_Width, m_Height);

                Server.Spells.SpellHelper.GetSurfaceTop(ref m_P3D);

                List<Server.Multis.BaseHouse> houses = null;

                AddonFitResult res = addon.CouldFit(m_P3D, m_Map, from, ref houses);

                if (res == AddonFitResult.Valid)
                    addon.MoveToWorld(new Point3D(m_P3D), m_Map);
                else if (res == AddonFitResult.Blocked)
                    from.SendLocalizedMessage(500269); // You cannot build that there.
                else if (res == AddonFitResult.NotInHouse)
                    from.SendLocalizedMessage(500274); // You can only place this in a house that you own!
                else if (res == AddonFitResult.DoorsNotClosed)
                    from.SendMessage("All doors must be closed!");

                if (res == AddonFitResult.Valid)
                {
                    m_Deed.Delete();

                    if (houses != null)
                    {
                        foreach (Server.Multis.BaseHouse h in houses)
                            h.Addons.Add(addon);

                        from.SendGump(new VariableCarpetPlacedGump(m_Deed));
                    }
                }
                else
                {
                    addon.Delete();
                }
            }
        }
    }
__________________
Ki Frost is offline   Reply With Quote
Old 01-11-2007, 06:54 AM   #2 (permalink)
Forum Novice
 
Graiston's Avatar
 
Join Date: Jan 2006
Location: Italy
Age: 20
Posts: 189
Send a message via ICQ to Graiston Send a message via MSN to Graiston
Default

i suppose the problem is that you are passing a list as a ref and not a single object, so the compiler says you that he cannot convert a list of object to a single object(ehich is the parameter needed)...
__________________
-------------------------------------------------------
Graiston is offline   Reply With Quote
Old 01-11-2007, 07:08 AM   #3 (permalink)
Forum Expert
 
Axle's Avatar
 
Join Date: Oct 2002
Location: Iowa, USA
Age: 38
Posts: 395
Default

Code:
ArrayList houses = null;
Taken from BaseAddOn.cs (RunUO RC 2.0)
Axle is offline   Reply With Quote
Old 01-24-2008, 07:04 PM   #4 (permalink)
Forum Novice
 
Join Date: Jul 2005
Posts: 138
Default

nvm wrong script location
__________________
~Visionary Kingdom~ Shard Owner
Scripts:
Player Vendor Search
Class Titles
Well Addons

Last edited by Yiffi; 01-30-2008 at 04:33 PM.
Yiffi 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