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

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

Closed Thread
 
Thread Tools Display Modes
Old 06-26-2006, 10:38 AM   #1 (permalink)
Forum Novice
 
Join Date: Mar 2005
Age: 28
Posts: 206
Post 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

Error :
Code:
The type or namespace name 'CommandEventArgs' 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 'Agressor'
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 'Controled' does not exist in the current context
Solution:
Another typo has been fixed, replace Controled with
Code:
Controlled
Error :
Code:
'Server.Items.YourItem.Dupe(int)': 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.GetContextMenuEntries(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 'ContextMenuEntry' 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 'List' could not be found (are you missing a using directive or an assembly reference?)
Solution:
Make sure your code contains:
Code:
using System.Collections.Generic;
daborg is offline  
Old 06-26-2006, 10:49 AM   #2 (permalink)
Forum Master
 
Joeku's Avatar
 
Join Date: Feb 2005
Location: ShatteredSosaria.com
Posts: 9,260
Default

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
	}

Last edited by Joeku; 06-26-2006 at 10:53 AM.
Joeku is offline  
Old 07-20-2006, 09:24 AM   #3 (permalink)
Newbie
 
Join Date: Sep 2005
Age: 38
Posts: 43
Default

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?)
Red_Satiin is offline  
Old 07-20-2006, 09:54 AM   #4 (permalink)
Forum Expert
 
Join Date: May 2005
Age: 29
Posts: 949
Default

"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()
Irian is offline  
Old 09-12-2007, 06:38 AM   #5 (permalink)
RunUO Forum Moderator
 
daat99's Avatar
 
Join Date: Dec 2004
Location: Israel
Age: 27
Posts: 8,163
Send a message via ICQ to daat99 Send a message via AIM to daat99
Default

This thread is now sticky and it'll be cleaned from irrelevant chatter every once in a while.
__________________
I always try to help
Sometimes, I don't know how....

My Web Page
Forum Rules
-------------------------------------------------------------
Extensive OWLTR System | Token System | World Teleporters
-------------------------------------------------------------
daat99 is offline  
Closed Thread

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