|
||
|
|
#26 (permalink) |
|
Connection Reset by Peer
Join Date: Jan 2003
Posts: 676
|
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~
}
}
}
|
|
|
|
|
|
#28 (permalink) |
|
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. |
|
|
|
|
|
|
#29 (permalink) |
|
Join Date: Oct 2002
Age: 23
Posts: 4,689
|
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.
|
|
|
|
|
|
#30 (permalink) |
|
Join Date: May 2004
Age: 36
Posts: 64
|
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]) ); |
|
|
|
|
|
#32 (permalink) | |
|
Join Date: May 2004
Age: 36
Posts: 64
|
Quote:
|
|
|
|
|
|
|
#33 (permalink) |
|
Forum Novice
Join Date: Dec 2005
Age: 19
Posts: 130
|
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. 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]) );
}
|
|
|
|
|
|
#34 (permalink) | |
|
Forum Novice
Join Date: Sep 2002
Posts: 238
|
Quote:
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. |
|
|
|
|
|
|
#35 (permalink) |
|
Forum Novice
Join Date: Dec 2005
Age: 19
Posts: 130
|
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.
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]) );
}
|
|
|
|
|
|
#38 (permalink) | |
|
Forum Novice
Join Date: Sep 2002
Posts: 238
|
Quote:
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 |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|