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!

1.0->2.0RC1 Conversion miniFAQ

daborg

Wanderer
1.0->2.0RC1 Conversion miniFAQ

So you decided to try to convert your scripts to the RC1 and now all those errors pop out? Here are the most common errors that you will run into, regardless if you are using custom scripts or not..

Note this FAQ is provided as is, you must know what you are doing, or you will break more then you will fix :D

Error :
Code:
The type or namespace name [COLOR="Red"]'CommandEventArgs' [/COLOR]could not be
found (are you missing a using directive or an assembly reference?)
Solution:
The name space of Commands has changed
Old namespace Server.Scripts.Commands has to be replaced by
Code:
using Server.Commands;

Error :
The type or namespace name 'Register' does not exist in the namespace 'Server.Commands' (are you missing an assembly reference?)
the proble is caused by this line:
Code:
Server.Commands.Register( "yourcommand", AccessLevel.Administrator, new CommandEventHandler( yourcommand_oncommand ) );
Solution:
replace with
Code:
CommandSystem.Register( "yourcommand", AccessLevel.Administrator, new CommandEventHandler( yourcommand_oncommand ) );

Error :
Code:
'Server.Mobiles.FightMode' does not contain a definition for [COLOR="red"]'Agressor'[/COLOR]
Solution:
some typos were fixed in new release including this one. just replace FightMode.Agressor in your failing script with
Code:
FightMode.Aggressor

Error :
Code:
The name[COLOR="red"] 'Controled' [/COLOR]does not exist in the current context
Solution:
Another typo has been fixed, replace Controled with
Code:
Controlled

Error :
Code:
'Server.Items.YourItem.[COLOR="red"]Dupe(int)'[/COLOR]: no suitable method found to override
Solution:
the dupe method is no longer supported, find the dupe code in your script and remove it. example dupe code:
Code:
public override Item Dupe( int amount )
		{
			return base.Dupe( new Ingot( amount ), amount );
		}


Error :
Code:
Server.Mobiles.YourMobile.[COLOR="red"]GetContextMenuEntries[/COLOR](Server.Mobile, System.Collections.ArrayList)': no suitable method found to override
Solution:
the ArrayList has been replaced with the type of List<YourType>.
find this line in your mobile code
Code:
public override void GetContextMenuEntries( Mobile from, ArrayList list )
and replace it with
Code:
   public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )

Error :
I did what you told me to do and now I have a new error(s)
Code:
The type or namespace name '[COLOR="red"]ContextMenuEntry[/COLOR]' could not be found (are you missing a using directive or an assembly reference?)
Solution:
Make sure your code contains:
Code:
using Server.ContextMenus;

Error :
I did what you told me to do and now I have a new error(s)
Code:
The type or namespace name [COLOR="red"]'List' could not be found [/COLOR](are you missing a using directive or an assembly reference?)
Solution:
Make sure your code contains:
Code:
using System.Collections.Generic;
 

Joeku

Lord
Nice, but... why don't you put this in the FAQ board?

***EDIT***
Here's something I remember:
Code:
	public enum AIType
	{
		AI_Use_Default,
		AI_Melee,		//old was AI_Meelee
		AI_Animal,
		AI_Archer,
		AI_Healer,
		AI_Vendor,
		AI_Mage,
		AI_Berserk,
		AI_Predator,
		AI_Thief
	}
 

Red_Satiin

Sorceror
Awesome! A Real Life Saver.. How about this one or two :S

The type or namespace name 'CommandPrefix' does not exist in the namespace 'Server.Commands' (are you missing an assembly reference?)

'Server.Accounting.Accounts' does not contain a definition for 'Table'

The type or namespace name 'DopplegangerFlesh' could not be found (are you missing a using directive or an assembly reference?)
 

Irian

Page
"CommandPrefix" : Replace with "CommandSystem.Prefix"

Table was replaced with a private Dictionary<string, IAccount>. To access the list of accounts, use...

Code:
ICollection<IAccount> GetAccounts()
 
now what cananyone help ?


Errors:
+ Misc/Spells/Base/Spellbook.cs:
CS0246: Line 37: The type or namespace name 'CommandEventArgs' 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.
 

Attachments

  • Spellbook.cs
    11.7 KB · Views: 1

daat99

Moderator
Staff member
Please read the original post.
This is the first problem with a solution in it.
 
Top