Go Back   RunUO - Ultima Online Emulation > RunUO > RunUO Post Archive

RunUO Post Archive The Archvie

Reply
 
Thread Tools Display Modes
Old 01-22-2005, 10:33 PM   #26 (permalink)
Connection Reset by Peer
 
Join Date: Jan 2003
Posts: 676
Default

Fixed GetProperties() for RunUO 1.0.0
Code:
		public override void GetProperties( ObjectPropertyList list )
  		{
  			base.GetProperties( list );
  
  			if (AccessLevel > AccessLevel.Player)
  			{
  				string color = "";
  				switch ( AccessLevel )
  				{
 		 		case AccessLevel.Counselor: color = "#00BFFF"; break; //Deep Sky Blue
 		 		case AccessLevel.GameMaster: color = "#FF0000"; break; //Red
 		 		case AccessLevel.Seer: color = "#00FF00"; break; //Green
 		 		case AccessLevel.Administrator: color = "#FFD700"; break; //Gold
  				}
 		 	list.Add( 1060658, "{0}\t{1}", "Staff", String.Format("<BASEFONT COLOR={0}>{1}", color, AccessLevelNames[(int)AccessLevel]) );
  			}
  
  			if ( Map == Faction.Facet )
  			{
 				PlayerState pl = PlayerState.Find( this );
  
  				if ( pl != null )
  				{
 					Faction faction = pl.Faction;
  
 					if ( faction.Commander == this )
 		 			list.Add( 1042733, faction.Definition.PropName ); // Commanding Lord of the ~1_FACTION_NAME~
 					else if ( pl.Sheriff != null )
 		 			list.Add( 1042734, "{0}\t{1}", pl.Sheriff.Definition.FriendlyName, faction.Definition.PropName ); // The Sheriff of ~1_CITY~, ~2_FACTION_NAME~
 					else if ( pl.Finance != null )
 		 			list.Add( 1042735, "{0}\t{1}", pl.Finance.Definition.FriendlyName, faction.Definition.PropName ); // The Finance Minister of ~1_CITY~, ~2_FACTION_NAME~
 		 		else if ( pl.MerchantTitle != MerchantTitle.None )
 		 			list.Add( 1060776, "{0}\t{1}", MerchantTitles.GetInfo( pl.MerchantTitle ).Title, faction.Definition.PropName ); // ~1_val~, ~2_val~
  					else
 		 			list.Add( 1060776, "{0}\t{1}", pl.Rank.Title, faction.Definition.PropName ); // ~1_val~, ~2_val~
  				}
  			}
  		}
tejster24 is offline   Reply With Quote
Old 01-29-2005, 09:44 PM   #27 (permalink)
Forum Novice
 
Hands Of God's Avatar
 
Join Date: Dec 2004
Age: 21
Posts: 121
Default

Sorry to hear u leave spider my shard uses most of ur scripts if not all. Ur one of the best and my shard thanks u. Well miss u From all at Darklords Home.
Hands Of God is offline   Reply With Quote
Old 01-31-2005, 09:12 AM   #28 (permalink)
 
Join Date: May 2004
Age: 21
Posts: 45
Send a message via MSN to AlienX2 Send a message via Yahoo to AlienX2
Unhappy

I have problem I using RunUO 1.0 RC0... I tried AOS.. but it's not working Look this error code: (What do i do?)

Code:
Scripts: Compiling C# scripts...failed (17 errors, 0 warnings)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2165, column 18) The ty
pe or namespace name 'Faction' could not be found (are you missing a using direc
tive or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2167, column 6) The typ
e or namespace name 'PlayerState' could not be found (are you missing a using di
rective or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0103: (line 2169, column 12) The na
me 'pl' does not exist in the class or namespace 'Server.Mobiles.PlayerMobile'
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2171, column 7) The typ
e or namespace name 'Faction' could not be found (are you missing a using direct
ive or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2173, column 12) The ty
pe or namespace name 'faction' could not be found (are you missing a using direc
tive or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2174, column 27) The ty
pe or namespace name 'faction' could not be found (are you missing a using direc
tive or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2175, column 17) The ty
pe or namespace name 'pl' could not be found (are you missing a using directive
or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2176, column 39) The ty
pe or namespace name 'pl' could not be found (are you missing a using directive
or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2176, column 75) The ty
pe or namespace name 'faction' could not be found (are you missing a using direc
tive or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2177, column 17) The ty
pe or namespace name 'pl' could not be found (are you missing a using directive
or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2178, column 39) The ty
pe or namespace name 'pl' could not be found (are you missing a using directive
or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2178, column 75) The ty
pe or namespace name 'faction' could not be found (are you missing a using direc
tive or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2179, column 17) The ty
pe or namespace name 'pl' could not be found (are you missing a using directive
or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2180, column 63) The ty
pe or namespace name 'pl' could not be found (are you missing a using directive
or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2180, column 89) The ty
pe or namespace name 'faction' could not be found (are you missing a using direc
tive or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2182, column 39) The ty
pe or namespace name 'pl' could not be found (are you missing a using directive
or an assembly reference?)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0246: (line 2182, column 54) The ty
pe or namespace name 'faction' could not be found (are you missing a using direc
tive 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.
AlienX2 is offline   Reply With Quote
Old 01-31-2005, 12:50 PM   #29 (permalink)
 
Join Date: Oct 2002
Age: 23
Posts: 4,689
Default

I am sorry, I am no longer supporting RC0. You are encouraged and required to update to RunUO 1.0.0. If you are unable to update, then you will not receive support. And I say this because that error was caused by the additions to 1.0.0, which you do not have.
XxSP1DERxX is offline   Reply With Quote
Old 01-31-2005, 01:29 PM   #30 (permalink)
 
Join Date: May 2004
Age: 36
Posts: 64
Default

FYI, I got errors with the 1.0.0 version of this code...will post them later...
If I remember right it said that "AccessLevelNames property could not be found.

I assume ( I know I am an a$$) this is the line it refers to...will look at it more later and give you more info...

list.Add( 1060658, "{0}\t{1}", "Staff", String.Format("<BASEFONT COLOR={0}>{1}", color, AccessLevelNames[(int)AccessLevel]) );
Joeblow is offline   Reply With Quote
Old 01-31-2005, 01:33 PM   #31 (permalink)
 
Join Date: Oct 2002
Age: 23
Posts: 4,689
Default

Did you take a look at the blue code above the GetProperties additions? You need to add that as well or else you will get that error.
XxSP1DERxX is offline   Reply With Quote
Old 01-31-2005, 07:50 PM   #32 (permalink)
 
Join Date: May 2004
Age: 36
Posts: 64
Default

Quote:
Originally Posted by XxSP1DERxX
Did you take a look at the blue code above the GetProperties additions? You need to add that as well or else you will get that error.
duh I feel like a retard now. Thx Spider. I knew I was missing something simple. Just had to find it. I was trying to add that during lunch and didn't have much time to play around. LOL Thx again.
Joeblow is offline   Reply With Quote
Old 05-05-2006, 10:45 PM   #33 (permalink)
Forum Novice
 
Join Date: Dec 2005
Age: 19
Posts: 130
Default

heres my error:
Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 41706
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS1513: (line 2393, column 2) } expec
ted
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
heres my addon...i think i screwed up somewhere:
Code:
public static string[] AccessLevelNames = new string[]
			{
				{
				"Player",
				"Counselor",
				"HeadCounselor",
				"Game Master",
				"HeadGameMaster",
				"Seer",
				"HeadSeer",
				"Scripter",
				"HeadScripter",
				"Administrator",
				"HeadAdministrator",
				"CoOwner",
				"Owner"
};

		public override void GetProperties( ObjectPropertyList list )
  		{
  			base.GetProperties( list );
  
  			if (AccessLevel > AccessLevel.Player)
  			{
  				string color = "";
  				switch ( AccessLevel )
  				{
				case AccessLevel.Owner: return 0x481;
				case AccessLevel.CoOwner: return 0x485;
				case AccessLevel.HeadAdministrator: return 0x484;
 		 		case AccessLevel.Administrator: color = "#FFD700"; break; //Gold
				case AccessLevel.HeadScripter: return 0x483;
				case AccessLevel.Scripter: return 0x497;
				case AccessLevel.HeadSeer: return 0x486;
 		 		case AccessLevel.Seer: color = "#00FF00"; break; //Green
				case AccessLevel.HeadGameMaster: return 0x489;
 		 		case AccessLevel.GameMaster: color = "#FF0000"; break; //Red
				case AccessLevel.HeadCounselor: return 0x48E;
 		 		case AccessLevel.Counselor: color = "#00BFFF"; break; //Deep Sky Blue
  				}
 		 	list.Add( 1060658, "{0}\t{1}", "Staff", String.Format("<BASEFONT COLOR={0}>{1}", color, AccessLevelNames[(int)AccessLevel]) );
  			}
Nine_Coronas is offline   Reply With Quote
Old 05-06-2006, 01:28 AM   #34 (permalink)
Forum Novice
 
Victor's Avatar
 
Join Date: Sep 2002
Posts: 238
Default

Quote:
Originally Posted by Nine_Coronas
heres my error:
Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 41706
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS1513: (line 2393, column 2) } expec
ted
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
The error is clear, you did not close a code block with "}".

Edit: I think this is your problem see that extra "{" I highlighted in red, get rid of it
Code:
public static string[] AccessLevelNames = new string[]
			{
				{
				"Player",
				"Counselor",
				"HeadCounselor",
				"Game Master",
				"HeadGameMaster",
				"Seer",
				"HeadSeer",
				"Scripter",
				"HeadScripter",
				"Administrator",
				"HeadAdministrator",
				"CoOwner",
				"Owner"
};

Last edited by Victor; 05-06-2006 at 01:32 AM.
Victor is offline   Reply With Quote
Old 05-07-2006, 02:57 PM   #35 (permalink)
Forum Novice
 
Join Date: Dec 2005
Age: 19
Posts: 130
Default

ok i removed that "}" and heres what i got

Code:
RunUO - [www.runuo.com] Version 1.0.0, Build 41706
Scripts: Compiling C# scripts...failed (16 errors, 16 warnings)
 - Warning: Scripts\customs\A_Li_N's Paintball 1.1.0\PBGameItem.cs: CS0183: (lin
e 196, column 13) The given expression is always of the provided ('Server.Mobile
') type
 - Warning: Scripts\customs\ExplodeCommand\Explode.cs: CS0183: (line 38, column
28) The given expression is always of the provided ('Server.Mobile') type
 - Warning: Scripts\customs\ExplodeCommand\Explode.cs: CS0183: (line 44, column
28) The given expression is always of the provided ('Server.Mobile') type
 - Warning: Scripts\customs\HarvestSystem\Garden\GardenDeed.cs: CS0162: (line 16
6, column 4) Unreachable code detected
 - Warning: Scripts\customs\HarvestSystem\Garden\SecureGarden.cs: CS0162: (line
123, column 10) Unreachable code detected
 - Warning: Scripts\customs\KillarQuest\SwordOfKillar.cs: CS0162: (line 63, colu
mn 30) Unreachable code detected
 - Warning: Scripts\customs\MLAddons\AquariumEastAddon.cs: CS0219: (line 22, col
umn 19) The variable 'ac' is assigned but its value is never used
 - Warning: Scripts\customs\MLAddons\AquariumSouthAddon.cs: CS0219: (line 22, co
lumn 19) The variable 'ac' is assigned but its value is never used
 - Warning: Scripts\customs\MLAddons\ElvenBedEastAddon.cs: CS0219: (line 22, col
umn 19) The variable 'ac' is assigned but its value is never used
 - Warning: Scripts\customs\MLAddons\ElvenBedSouthAddon.cs: CS0219: (line 22, co
lumn 19) The variable 'ac' is assigned but its value is never used
 - Warning: Scripts\customs\MLAddons\ParrotPerchEastAddon.cs: CS0219: (line 21,
column 19) The variable 'ac' is assigned but its value is never used
 - Warning: Scripts\customs\MLAddons\ParrotPerchSouthAddon.cs: CS0219: (line 21,
 column 19) The variable 'ac' is assigned but its value is never used
 - Warning: Scripts\customs\MLAddons\StoneCoffinEastAddon.cs: CS0219: (line 22,
column 19) The variable 'ac' is assigned but its value is never used
 - Warning: Scripts\customs\MLAddons\StoneCoffinSouthAddon.cs: CS0219: (line 22,
 column 19) The variable 'ac' is assigned but its value is never used
 - Warning: Scripts\customs\RaceGump.cs: CS0162: (line 377, column 6) Unreachabl
e code detected
 - Warning: Scripts\Engines\watchuo_10\Core.cs: CS0168: (line 56, column 7) The
variable 'ode' is declared but never used
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0127: (line 2222, column 29) Since
'Server.Mobiles.PlayerMobile.GetProperties(Server.ObjectPropertyList)' returns v
oid, a return keyword must not be followed by an object expression
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0163: (line 2220, column 7) Control
 cannot fall through from one case label ('case 12:') to another
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0127: (line 2223, column 31) Since
'Server.Mobiles.PlayerMobile.GetProperties(Server.ObjectPropertyList)' returns v
oid, a return keyword must not be followed by an object expression
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0163: (line 2220, column 7) Control
 cannot fall through from one case label ('case 11:') to another
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0127: (line 2224, column 41) Since
'Server.Mobiles.PlayerMobile.GetProperties(Server.ObjectPropertyList)' returns v
oid, a return keyword must not be followed by an object expression
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0163: (line 2220, column 7) Control
 cannot fall through from one case label ('case 10:') to another
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0127: (line 2226, column 36) Since
'Server.Mobiles.PlayerMobile.GetProperties(Server.ObjectPropertyList)' returns v
oid, a return keyword must not be followed by an object expression
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0163: (line 2220, column 7) Control
 cannot fall through from one case label ('case 8:') to another
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0127: (line 2227, column 32) Since
'Server.Mobiles.PlayerMobile.GetProperties(Server.ObjectPropertyList)' returns v
oid, a return keyword must not be followed by an object expression
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0163: (line 2220, column 7) Control
 cannot fall through from one case label ('case 7:') to another
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0127: (line 2228, column 32) Since
'Server.Mobiles.PlayerMobile.GetProperties(Server.ObjectPropertyList)' returns v
oid, a return keyword must not be followed by an object expression
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0163: (line 2220, column 7) Control
 cannot fall through from one case label ('case 6:') to another
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0127: (line 2230, column 38) Since
'Server.Mobiles.PlayerMobile.GetProperties(Server.ObjectPropertyList)' returns v
oid, a return keyword must not be followed by an object expression
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0163: (line 2220, column 7) Control
 cannot fall through from one case label ('case 4:') to another
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0127: (line 2232, column 37) Since
'Server.Mobiles.PlayerMobile.GetProperties(Server.ObjectPropertyList)' returns v
oid, a return keyword must not be followed by an object expression
 - Error: Scripts\Mobiles\PlayerMobile.cs: CS0163: (line 2220, column 7) Control
 cannot fall through from one case label ('case 2:') to another
Scripts: One or more scripts failed to compile or no script files were found.
 - Press return to exit, or R to try again.
here is that area

Code:
public static string[] AccessLevelNames = new string[]
			{
				"Player",
				"Counselor",
				"HeadCounselor",
				"Game Master",
				"HeadGameMaster",
				"Seer",
				"HeadSeer",
				"Scripter",
				"HeadScripter",
				"Administrator",
				"HeadAdministrator",
				"CoOwner",
				"Owner"
			};

		public override void GetProperties( ObjectPropertyList list )
  		{
  			base.GetProperties( list );
  
  			if (AccessLevel > AccessLevel.Player)
  			{
  				string color = "";
  				switch ( AccessLevel )
  				{
				case AccessLevel.Owner: return 0x481;
				case AccessLevel.CoOwner: return 0x485;
				case AccessLevel.HeadAdministrator: return 0x484;
 		 		case AccessLevel.Administrator: color = "#FFD700"; break; //Gold
				case AccessLevel.HeadScripter: return 0x483;
				case AccessLevel.Scripter: return 0x497;
				case AccessLevel.HeadSeer: return 0x486;
 		 		case AccessLevel.Seer: color = "#00FF00"; break; //Green
				case AccessLevel.HeadGameMaster: return 0x489;
 		 		case AccessLevel.GameMaster: color = "#FF0000"; break; //Red
				case AccessLevel.HeadCounselor: return 0x48E;
 		 		case AccessLevel.Counselor: color = "#00BFFF"; break; //Deep Sky Blue
  				}
 		 	list.Add( 1060658, "{0}\t{1}", "Staff", String.Format("<BASEFONT COLOR={0}>{1}", color, AccessLevelNames[(int)AccessLevel]) );
  			}
Nine_Coronas is offline   Reply With Quote
Old 05-07-2006, 08:08 PM   #36 (permalink)
Forum Novice
 
Victor's Avatar
 
Join Date: Sep 2002
Posts: 238
Default

This time your errors are in other scripts. Look at the error messages, this time there is errors in gardendeed.cs, explode.cs, securegarden.cs, etc.
Victor is offline   Reply With Quote
Old 05-11-2006, 10:58 PM   #37 (permalink)
Forum Novice
 
Join Date: Dec 2005
Age: 19
Posts: 130
Default

those are warnings if you looked, the errors are at the bottem if u use the scroll
Nine_Coronas is offline   Reply With Quote
Old 05-11-2006, 11:09 PM   #38 (permalink)
Forum Novice
 
Victor's Avatar
 
Join Date: Sep 2002
Posts: 238
Default

Quote:
Originally Posted by Nine_Coronas
those are warnings if you looked, the errors are at the bottem if u use the scroll
Oh yes, I see.
Code:
Error: Scripts\Mobiles\PlayerMobile.cs: CS0127: (line 2222, column 29) Since
'Server.Mobiles.PlayerMobile.GetProperties(Server.ObjectPropertyList)' returns v
oid, a return keyword must not be followed by an object expression
This error is of the most importance because the method is declared with void return type you can not use those returns you have in your switch case.
Victor is offline   Reply With Quote
Old 05-11-2006, 11:31 PM   #39 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

If you get errors, by using this unsupported archive script, it means you didn't make the required changes.
Phantom 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