RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Various 2.0 to 2.1 Conversion Errors

Nockar

Sorceror
This is a pretty long list. BUT there are a lot of dublicet things in here.

I am getting a lot of errors for 'XmlSockets'

The DailyRaresSystem.cs was InitSpawn and I changed it to InitSpawner but that did not seem to work.

Code:
Errors:
+ Items/Armor/BaseArmor.cs:
    CS0103: Line 1440: The name 'XmlSockets' does not exist in the current conte
xt
+ Items/Weapons/BaseWeapon.cs:
    CS0103: Line 3472: The name 'XmlSockets' does not exist in the current conte
xt
+ Mobiles/BaseCreature.cs:
    CS0103: Line 1097: The name 'XmlSockets' does not exist in the current conte
xt
+ Customs/00 Extended Localizer - PropertyList-2-StringList/IndependentStringLi
st.cs:
    CS1501: Line 73: No overload for method 'StringEntry' takes '2' arguments
+ Customs/00 Extended Localizer - PropertyList-2-StringList/UOSDK Path Fix.cs:
    CS0117: Line 14: 'Ultima.Client' does not contain a definition for 'Director
ies'
+ Customs/00 My Scrips/003 CEOs AddonGen/AddonGenerator.cs:
    CS0117: Line 269: 'Server.Map' does not contain a definition for 'GetTilesAt
'
    CS0246: Line 276: The type or namespace name 'Tile' could not be found (are
you missing a using directive or an assembly reference?)
    CS1502: Line 280: The best overloaded method match for 'System.Collections.G
eneric.List<Server.StaticTile>.Add(Server.StaticTile)' has some invalid argument
s
    CS1503: Line 280: Argument '1': cannot convert from 'Tile' to 'Server.Static
Tile'
    CS1502: Line 282: The best overloaded method match for 'System.Collections.G
eneric.List<Server.StaticTile>.Add(Server.StaticTile)' has some invalid argument
s
    CS1503: Line 282: Argument '1': cannot convert from 'Tile' to 'Server.Static
Tile'
    CS1502: Line 284: The best overloaded method match for 'System.Collections.G
eneric.List<Server.StaticTile>.Add(Server.StaticTile)' has some invalid argument
s
    CS1503: Line 284: Argument '1': cannot convert from 'Tile' to 'Server.Static
Tile'
    CS1502: Line 286: The best overloaded method match for 'System.Collections.G
eneric.List<Server.StaticTile>.Add(Server.StaticTile)' has some invalid argument
s
    CS1503: Line 286: Argument '1': cannot convert from 'Tile' to 'Server.Static
Tile'
    CS1502: Line 288: The best overloaded method match for 'System.Collections.G
eneric.List<Server.StaticTile>.Add(Server.StaticTile)' has some invalid argument
s
    CS1503: Line 288: Argument '1': cannot convert from 'Tile' to 'Server.Static
Tile'
    CS0246: Line 291: The type or namespace name 'Tile' could not be found (are
you missing a using directive or an assembly reference?)
    CS1502: Line 293: The best overloaded method match for 'System.Collections.G
eneric.List<Server.StaticTile>.Remove(Server.StaticTile)' has some invalid argum
ents
    CS1503: Line 293: Argument '1': cannot convert from 'Tile' to 'Server.Static
Tile'
    CS0246: Line 427: The type or namespace name 'Tile' could not be found (are
you missing a using directive or an assembly reference?)
    CS0246: Line 469: The type or namespace name 'Tile' could not be found (are
you missing a using directive or an assembly reference?)
+ Customs/00 My Scrips/005 UO Architect_OrbRemoteServer/UOArchitect/ExtractItem
sRequest.cs:
    CS0117: Line 182: 'Server.MultiComponentList' does not contain a definition
for 'StaticTiles'
+ Customs/00 My Scrips/Commands/StatsGump.cs:
    CS0117: Line 16: 'Server.Commands.Properties' does not contain a definition
for 'Register'
+ Items/Clothing/BaseClothing.cs:
    CS0103: Line 588: The name 'XmlSockets' does not exist in the current contex
t
+ Items/Jewels/BaseJewel.cs:
    CS0103: Line 268: The name 'XmlSockets' does not exist in the current contex
t
+ Customs/00 My Scrips/FS Daily Rares/Core/DailyRaresSystem.cs:
    CS0122: Line 435: 'Server.Mobiles.Spawner.InitSpawner(int, System.TimeSpan,
System.TimeSpan, int, int, System.Collections.Generic.List<string>)' is inaccess
ible due to its protection level
    CS0122: Line 439: 'Server.Mobiles.Spawner.InitSpawner(int, System.TimeSpan,
System.TimeSpan, int, int, System.Collections.Generic.List<string>)' is inaccess
ible due to its protection level
    CS0122: Line 443: 'Server.Mobiles.Spawner.InitSpawner(int, System.TimeSpan,
System.TimeSpan, int, int, System.Collections.Generic.List<string>)' is inaccess
ible due to its protection level
    CS0122: Line 447: 'Server.Mobiles.Spawner.InitSpawner(int, System.TimeSpan,
System.TimeSpan, int, int, System.Collections.Generic.List<string>)' is inaccess
ible due to its protection level
    CS0122: Line 451: 'Server.Mobiles.Spawner.InitSpawner(int, System.TimeSpan,
System.TimeSpan, int, int, System.Collections.Generic.List<string>)' is inaccess
ible due to its protection level
    CS0122: Line 455: 'Server.Mobiles.Spawner.InitSpawner(int, System.TimeSpan,
System.TimeSpan, int, int, System.Collections.Generic.List<string>)' is inaccess
ible due to its protection level
    CS0117: Line 459: 'Server.Items.VoransTownCrate' does not contain a definiti
on for 'InitSpawner'
    CS0117: Line 463: 'Server.Items.VoransTownCrate' does not contain a definiti
on for 'InitSpawner'
    CS0122: Line 479: 'Server.Mobiles.Spawner.InitSpawner(int, System.TimeSpan,
System.TimeSpan, int, int, System.Collections.Generic.List<string>)' is inaccess
ible due to its protection level
    CS0122: Line 483: 'Server.Mobiles.Spawner.InitSpawner(int, System.TimeSpan,
System.TimeSpan, int, int, System.Collections.Generic.List<string>)' is inaccess
ible due to its protection level
    CS0122: Line 487: 'Server.Mobiles.Spawner.InitSpawner(int, System.TimeSpan,
System.TimeSpan, int, int, System.Collections.Generic.List<string>)' is inaccess
ible due to its protection level
    CS0122: Line 491: 'Server.Mobiles.Spawner.InitSpawner(int, System.TimeSpan,
System.TimeSpan, int, int, System.Collections.Generic.List<string>)' is inaccess
ible due to its protection level
    CS0122: Line 495: 'Server.Mobiles.Spawner.InitSpawner(int, System.TimeSpan,
System.TimeSpan, int, int, System.Collections.Generic.List<string>)' is inaccess
ible due to its protection level
    CS0122: Line 499: 'Server.Mobiles.Spawner.InitSpawner(int, System.TimeSpan,
System.TimeSpan, int, int, System.Collections.Generic.List<string>)' is inaccess
ible due to its protection level
+ Customs/00 WebServer/WebObjects/ItemCatalog.wsobj.cs:
    CS0117: Line 26: 'Ultima.Client' does not contain a definition for 'Director
ies'
    CS0122: Line 26: 'Server.Misc.DataPath.CustomPath' is inaccessible due to it
s protection level
    CS1502: Line 79: The best overloaded method match for 'Ultima.Art.GetLand(in
t, out bool)' has some invalid arguments
    CS1620: Line 79: Argument '2' must be passed with the 'out' keyword
    CS1502: Line 79: The best overloaded method match for 'Ultima.Art.GetStatic(
int, out bool)' has some invalid arguments
    CS1620: Line 79: Argument '2' must be passed with the 'out' keyword
+ Customs/00 WebServer/WebObjects/Paperdoll.wsobj.cs:
    CS0117: Line 42: 'Ultima.Client' does not contain a definition for 'Director
ies'
    CS0122: Line 42: 'Server.Misc.DataPath.CustomPath' is inaccessible due to it
s protection level
+ Customs/Xml Spawner/00 Augments/keyaugment.cs:
    CS0246: Line 110: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
    CS1502: Line 110: The best overloaded method match for 'Server.Engines.XmlSp
awner2.XmlAttach.AttachTo(object, Server.Engines.XmlSpawner2.XmlAttachment)' has
some invalid arguments
    CS1503: Line 110: Argument '2': cannot convert from 'XmlSockets' to 'Server.
Engines.XmlSpawner2.XmlAttachment'
+ Customs/Xml Spawner/00 XML Socket/BoxOfTransmutation.cs:
    CS0246: Line 544: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
    CS0246: Line 544: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
    CS0246: Line 544: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
    CS0246: Line 608: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
    CS0246: Line 616: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
    CS1502: Line 616: The best overloaded method match for 'Server.Engines.XmlSp
awner2.XmlAttach.AttachTo(object, Server.Engines.XmlSpawner2.XmlAttachment)' has
some invalid arguments
    CS1503: Line 616: Argument '2': cannot convert from 'XmlSockets' to 'Server.
Engines.XmlSpawner2.XmlAttachment'
    CS0246: Line 625: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
    CS0246: Line 633: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
    CS1502: Line 633: The best overloaded method match for 'Server.Engines.XmlSp
awner2.XmlAttach.AttachTo(object, Server.Engines.XmlSpawner2.XmlAttachment)' has
some invalid arguments
    CS1503: Line 633: Argument '2': cannot convert from 'XmlSockets' to 'Server.
Engines.XmlSpawner2.XmlAttachment'
+ Customs/Xml Spawner/00 XML Socket/ExceptionalSocketHammer.cs:
    CS0246: Line 89: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
+ Customs/Xml Spawner/00 XML Socket/HammerOfRecovery.cs:
    CS0246: Line 55: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
+ Customs/Xml Spawner/00 XML Socket/SocketHammer.cs:
    CS0246: Line 55: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
+ Customs/Xml Spawner/00 XML Socket/TestSocketedWeapon.cs:
    CS0246: Line 20: The type or namespace name 'XmlSocketable' could not be fou
nd (are you missing a using directive or an assembly reference?)
    CS1502: Line 20: The best overloaded method match for 'Server.Engines.XmlSpa
wner2.XmlAttach.AttachTo(object, Server.Engines.XmlSpawner2.XmlAttachment)' has
some invalid arguments
    CS1503: Line 20: Argument '2': cannot convert from 'XmlSocketable' to 'Serve
r.Engines.XmlSpawner2.XmlAttachment'
    CS0246: Line 21: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
    CS1502: Line 21: The best overloaded method match for 'Server.Engines.XmlSpa
wner2.XmlAttach.AttachTo(object, Server.Engines.XmlSpawner2.XmlAttachment)' has
some invalid arguments
    CS1503: Line 21: Argument '2': cannot convert from 'XmlSockets' to 'Server.E
ngines.XmlSpawner2.XmlAttachment'
    CS0246: Line 26: The type or namespace name 'XmlSocketable' could not be fou
nd (are you missing a using directive or an assembly reference?)
    CS1502: Line 26: The best overloaded method match for 'Server.Engines.XmlSpa
wner2.XmlAttach.AttachTo(object, Server.Engines.XmlSpawner2.XmlAttachment)' has
some invalid arguments
    CS1503: Line 26: Argument '2': cannot convert from 'XmlSocketable' to 'Serve
r.Engines.XmlSpawner2.XmlAttachment'
    CS0246: Line 30: The type or namespace name 'XmlSocketable' could not be fou
nd (are you missing a using directive or an assembly reference?)
    CS1502: Line 30: The best overloaded method match for 'Server.Engines.XmlSpa
wner2.XmlAttach.AttachTo(object, Server.Engines.XmlSpawner2.XmlAttachment)' has
some invalid arguments
    CS1503: Line 30: Argument '2': cannot convert from 'XmlSocketable' to 'Serve
r.Engines.XmlSpawner2.XmlAttachment'
    CS0246: Line 31: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
    CS1502: Line 31: The best overloaded method match for 'Server.Engines.XmlSpa
wner2.XmlAttach.AttachTo(object, Server.Engines.XmlSpawner2.XmlAttachment)' has
some invalid arguments
    CS1503: Line 31: Argument '2': cannot convert from 'XmlSockets' to 'Server.E
ngines.XmlSpawner2.XmlAttachment'
    CS0246: Line 37: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
    CS0246: Line 37: The type or namespace name 'XmlSockets' could not be found
(are you missing a using directive or an assembly reference?)
    CS0103: Line 41: The name 'XmlSockets' does not exist in the current context

    CS1502: Line 43: The best overloaded method match for 'Server.Engines.XmlSpa
wner2.XmlAttach.AttachTo(object, Server.Engines.XmlSpawner2.XmlAttachment)' has
some invalid arguments
    CS1503: Line 43: Argument '2': cannot convert from 'XmlSockets' to 'Server.E
ngines.XmlSpawner2.XmlAttachment'
    CS0246: Line 45: The type or namespace name 'XmlSocketable' could not be fou
nd (are you missing a using directive or an assembly reference?)
    CS1502: Line 45: The best overloaded method match for 'Server.Engines.XmlSpa
wner2.XmlAttach.AttachTo(object, Server.Engines.XmlSpawner2.XmlAttachment)' has
some invalid arguments
    CS1503: Line 45: Argument '2': cannot convert from 'XmlSocketable' to 'Serve
r.Engines.XmlSpawner2.XmlAttachment'
+ Customs/Xml Spawner/00 Xml The Complete Customizable Vendor/[RC2] Rewards Sys
tem - XML Attachments .cs:
    CS0117: Line 2156: 'Server.Network.NetState' does not contain a definition f
or 'IsPost6017'
    CS1502: Line 2356: The best overloaded method match for 'System.Collections.
ArrayList.Sort(System.Collections.IComparer)' has some invalid arguments
    CS1503: Line 2356: Argument '1': cannot convert from 'Server.Mobiles.BuyItem
StateComparer' to 'System.Collections.IComparer'
    CS0117: Line 2363: 'Server.Network.NetState' does not contain a definition f
or 'IsPost6017'
    CS1502: Line 2364: The best overloaded method match for 'Server.Network.Vend
orBuyContent6017.VendorBuyContent6017(System.Collections.Generic.List<Server.Mob
iles.BuyItemState>)' has some invalid arguments
    CS1503: Line 2364: Argument '1': cannot convert from 'System.Collections.Arr
ayList' to 'System.Collections.Generic.List<Server.Mobiles.BuyItemState>'
    CS1502: Line 2366: The best overloaded method match for 'Server.Network.Vend
orBuyContent.VendorBuyContent(System.Collections.Generic.List<Server.Mobiles.Buy
ItemState>)' has some invalid arguments
    CS1503: Line 2366: Argument '1': cannot convert from 'System.Collections.Arr
ayList' to 'System.Collections.Generic.List<Server.Mobiles.BuyItemState>'
    CS1502: Line 2367: The best overloaded method match for 'Server.Network.Vend
orBuyList.VendorBuyList(Server.Mobile, System.Collections.Generic.List<Server.Mo
biles.BuyItemState>)' has some invalid arguments
    CS1503: Line 2367: Argument '2': cannot convert from 'System.Collections.Arr
ayList' to 'System.Collections.Generic.List<Server.Mobiles.BuyItemState>'
+ Items/Misc/PublicMoongate.cs:
    CS0266: Line 471: Cannot implicitly convert type 'Server.ClientFlags' to 'in
t'. An explicit conversion exists (are you missing a cast?)
+ Misc/CharacterCreation.cs:
    CS0266: Line 863: Cannot implicitly convert type 'Server.ClientFlags' to 'in
t'. An explicit conversion exists (are you missing a cast?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

This might be helpful for people out there who are converting scripts from 2.0 to 2.1
It’s a list of all of the changes I have found so far.
Code:
    private ArrayList m_SBInfos = new ArrayList();
    protected override ArrayList SBInfos{ get { return m_SBInfos; } }
to
    private List<SBInfo> m_SBInfos = new List<SBInfo>();
    protected override List<SBInfo> SBInfos { get { return m_SBInfos; } }
  
    using System.Collections;
to
    using System.Collections.Generic;
  
    Tile[] tiles = map.Tiles.GetStaticTiles(vx, vy, true);
to
    StaticTile[] tiles = map.Tiles.GetStaticTiles(vx, vy, true);
  
    int id = tiles[i].ID & 0x7FFF;
to
    int id = tiles[i].ID;
 
    private List<string> m_CreaturesName;
    private List<IEntity> m_Creatures;
to
    private List<string> m_SpawnNames;
    private List<ISpawnable> m_Spawned;
 
    Tile[] tiles = map.Tiles.GetStaticTiles( from.X+x, from.Y+y, true );
to
    StaticTile[] tiles = map.Tiles.GetStaticTiles( from.X+x, from.Y+y, true );
 
    int id = tiles[i].ID & 0x7FFF;
to
    int id = tiles[i].ID;
 
    InitSpawn
to
    InitSpawner
 
****************XML Spawner Changes****
    List<Server.Tile> tiles = map.GetTilesAt(new Point2D(X, Y), true, true, true);
to
    StaticTile[] tiles = map.Tiles.GetStaticTiles(X, Y, true);
 
    public Point3D Home
to
    public Point3D HomeLocation
 
    public void Remove(object spawn)
to
    public void Remove(ISpawnable spawn)
****************XML Spawner Changes****
 

KHzspeed

Sorceror
bumping this topic.
I'm asking the same question as Phr3d13 above me.

what did you do to correct the Statsgump.cs error?
Code:
Errors:
+ Customs/Systems/StatGump.cs:
   CS0117: Line 16: 'Server.Commands.Properties' dose not contain a definition
for 'Register'
 

rtaylor1987

Sorceror
Meh, I hate "just comment out the line" fixes - it's just like putting duct tape over a leak while inside a submarine - sure... it'll plug it up for now...but who knows.

Anyway, they changed the way commands are registered. The real fix is this:
Code:
 public class StatsGump : Gump
    {
        public static void Initialize()
        {
            CommandSystem.Register( "MyStats", AccessLevel.Player, new CommandEventHandler( MyStats_OnCommand ) );
    }
        public static void Register( string command, AccessLevel access, CommandEventHandler handler )
        {
            CommandSystem.Register(command, access, handler);
        }

Here's the working version if anyone wants it:
 

Attachments

  • StatsGump.cs
    9.8 KB · Views: 22

Macil

Sorceror
I'm having trouble with this error:
Code:
RunUO - [www.runuo.com] Version 2.1, Build 4247.24217
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 4 64-bit processors
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
+ Mobiles/PlayerMobile.cs:
    CS0246: Line 1949: The type or namespace name 'Tile' could not be found (are
you missing a using directive or an assembly reference?)
    CS0117: Line 1949: 'Server.Map' does not contain a definition for 'GetTilesA
t'
    CS0246: Line 1952: The type or namespace name 'Tile' could not be found (are
you missing a using directive 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.

I tried using the GetTile code suggested as up above but I still get problems. The error is pertaining a Swamp Boots script I have on my shard where swamps are supposed to be poisonous.

Code:
protected override void OnLocationChange( Point3D oldLocation )
        {
                    bool isSwampOrPoisonTile = false;
                   List<Tile> list = this.Map.GetTilesAt(new Point2D(this.X, this.Y), true, true, true);
                    for (int i = 0; i < list.Count; i++)
                    {
                        Tile tile = list[i];
                int avgZ = Map.GetAverageZ( this.X, this.Y );
                        if (this.Location.Z == avgZ && ((tile.ID >= 2012 && tile.ID <= 2056) || (tile.ID >= 2017 && tile.ID <= 2151) || (tile.ID >= 11790 && tile.ID <= 11871) || (tile.ID >= 15088 && tile.ID <= 15941) || (tile.ID >= 15974 && tile.ID <= 16208)))
                {
                                isSwampOrPoisonTile = true;
                    continue;
                }
                    }
                    if (isSwampOrPoisonTile)
                    {
                        int poisonChance = Utility.Random(1, 75);
                        if (poisonChance > this.PoisonResistance)
                        {
                                SwampBoots boots = this.FindItemOnLayer(Layer.Shoes) as SwampBoots;
                                if (boots != null)
                                {
                                    boots.HitPoints -= 1;
                                    if (boots.HitPoints <= 0)
                                    {
                                            this.SendMessage(0, "Your Swamp Boots have decayed.");
                                            boots.Delete();
                                    }
                                }
                                else
                                    this.Poison = Poison.Regular;
                        }
                    }
                
            CheckLightLevels( false );

            DesignContext context = m_DesignContext;

            if ( context == null || m_NoRecursion )
                return;

            m_NoRecursion = true;

            HouseFoundation foundation = context.Foundation;

            int newX = this.X, newY = this.Y;
            int newZ = foundation.Z + HouseFoundation.GetLevelZ( context.Level, context.Foundation );

            int startX = foundation.X + foundation.Components.Min.X + 1;
            int startY = foundation.Y + foundation.Components.Min.Y + 1;
            int endX = startX + foundation.Components.Width - 1;
            int endY = startY + foundation.Components.Height - 2;

            if ( newX >= startX && newY >= startY && newX < endX && newY < endY && Map == foundation.Map )
            {
                if ( Z != newZ )
                    Location = new Point3D( X, Y, newZ );

                m_NoRecursion = false;
                return;
            }

            Location = new Point3D( foundation.X, foundation.Y, newZ );
            Map = foundation.Map;

            m_NoRecursion = false;
        }
 

Iraq-

Sorceror
Tile was changed to StaticTile, so change that and it should work.

Also, that's an interesting script.
 
Top