x4x poison x4x
Wanderer
} error
i know it has something to do with the {} brackets, i tryed fixing it but kept getting more errors.
i know it has something to do with the {} brackets, i tryed fixing it but kept getting more errors.
Code:
Scripts: Compiling C# scripts...failed (1 err
Errors:
+ Items/Misc/PublicMoongate.cs:
CS1513: Line 516: } expected
CS1513: Line 516: } expected
CS1513: Line 516: } expected
Scripts: One or more scripts failed to compil
- Press return to exit, or R to try again.
Code:
public override void OnResponse( NetState state, RelayInfo info )
{
if ( info.ButtonID == 0 ) // Cancel
return;
else if ( m_Mobile.Deleted || m_Moongate.Deleted || m_Mobile.Map == null )
return;
if ( info.ButtonID == 2 )
{
ArrayList a = new ArrayList();
foreach ( Item i in World.Items.Values )
{
if ( i is CityManagementStone )
{
CityManagementStone s = (CityManagementStone)i;
if ( s.HasMoongate == true && s.IsRegistered == true )
[COLOR="Red"]scroll down [/COLOR] a.Add( i );
}
}
if ( a.Count == 0 )
{
m_Mobile.SendGump( new NoCitiesGump() );
}
else
{
m_Mobile.SendGump( new PCMoongateGump( m_Moongate, 0, null, null ) );
}
}
int[] switches = info.Switches;
if ( switches.Length == 0 )
return;
int switchID = switches[0];
int listIndex = switchID / 100;
int listEntry = switchID % 100;
if ( listIndex < 0 || listIndex >= m_Lists.Length )
return;
PMList list = m_Lists[listIndex];
if ( listEntry < 0 || listEntry >= list.Entries.Length )
return;
PMEntry entry = list.Entries[listEntry];
if ( !m_Mobile.InRange( m_Moongate.GetWorldLocation(), 1 ) || m_Mobile.Map != m_Moongate.Map )
{
m_Mobile.SendLocalizedMessage( 1019002 ); // You are too far away to use the gate.
}
else if ( m_Mobile.Player && m_Mobile.Kills >= 5 && list.Map != Map.Felucca )
{
m_Mobile.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
}
else if ( Factions.Sigil.ExistsOn( m_Mobile ) && list.Map != Factions.Faction.Facet )
{
m_Mobile.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
}
else if ( m_Mobile.Criminal )
{
m_Mobile.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily.
}
else if ( SpellHelper.CheckCombat( m_Mobile ) )
{
m_Mobile.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle??
}
else if ( m_Mobile.Spell != null )
{
m_Mobile.SendLocalizedMessage( 1049616 ); // You are too busy to do that at the moment.
}
else if ( m_Mobile.Map == list.Map && m_Mobile.InRange( entry.Location, 1 ) )
{
m_Mobile.SendLocalizedMessage( 1019003 ); // You are already there.
}
else
{
CityManagementStone outgoingCity = null;
Region currentRegion = Region.Find( m_Mobile.Location, m_Mobile.Map );
if ( currentRegion != null )
{
if ( currentRegion is PlayerCityRegion )
{
PlayerCityRegion pcr = (PlayerCityRegion)currentRegion;
outgoingCity = pcr.Stone;
}
}
if ( outgoingCity != null && outgoingCity.TravelTax >= 1 )
{
m_Mobile.SendGump( new PCMoongateToll2Gump( m_Moongate, outgoingCity, entry.Location, list.Map ) );
}
else
{
BaseCreature.TeleportPets( m_Mobile, entry.Location, list.Map );
m_Mobile.Combatant = null;
m_Mobile.Warmode = false;
m_Mobile.Hidden = true;
m_Mobile.MoveToWorld( entry.Location, list.Map );
Effects.PlaySound( entry.Location, list.Map, 0x1FE );
}
}
[COLOR="Red"]516[/COLOR]}