LordFenris

Member
Exception:
System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
at Server.Map+ClientEnumerator.MoveNext () [0x00000] in <filename unknown>:0
at Server.Mobile.OnHiddenChanged () [0x00000] in <filename unknown>:0
at Server.Mobiles.PlayerMobile.OnHiddenChanged () [0x00000] in <filename unknown>:0
at Server.Mobile.set_Hidden (Boolean value) [0x00000] in <filename unknown>:0
at Server.Mobile.RevealingAction () [0x00000] in <filename unknown>:0
at Server.Mobiles.PlayerMobile.RevealingAction () [0x00000] in <filename unknown>:0
at Server.Spells.Spell.Cast () [0x00000] in <filename unknown>:0
at Server.Items.Spellbook.EventSink_CastSpellRequest (Server.CastSpellRequestEventArgs e) [0x00000] in <filename unknown>:0
at Server.EventSink.InvokeCastSpellRequest (Server.CastSpellRequestEventArgs e) [0x00000] in <filename unknown>:0
at Server.Network.PacketHandlers.CastSpell (Server.Network.NetState state, Server.Network.PacketReader pvSrc) [0x00000] in <filename unknown>:0
at Server.Network.PacketHandlers.ExtendedCommand (Server.Network.NetState state, Server.Network.PacketReader pvSrc) [0x00000] in <filename unknown>:0
at Server.Network.MessagePump.HandleReceive (Server.Network.NetState ns) [0x00000] in <filename unknown>:0
at Server.Network.MessagePump.Slice () [0x00000] in <filename unknown>:0
at Server.Core.Main (System.String[] args) [0x00000] in <filename unknown>:0


I've never encountered a similar problem. Any idea?
 
Last edited:
Hello Fenris,

You might want to try this MoveNext funtion in Map.cs (plz notice the difference with yours ^^) :

Code:
			public bool MoveNext()

			{

				while (true)

				{

					++m_CurrentIndex;

					if (m_CurrentIndex == m_CurrentList.Count)

					{

						++m_ySector;

						if (m_ySector > m_ySectorEnd)

						{

							m_ySector = m_ySectorStart;

							++m_xSector;

							if (m_xSector > m_xSectorEnd)

							{

								m_CurrentIndex = -1;

								return false;

							}

						}

						m_CurrentIndex = -1;

						m_CurrentList = m_Map.InternalGetSector(m_xSector, m_ySector).Clients;

					}

					else

					{		

						if (m_CurrentList.Count == 0)

							return false;



						if (m_CurrentIndex > m_CurrentList.Count)

							return false;


						Mobile m = m_CurrentList[m_CurrentIndex].Mobile;

						if (m != null && !m.Deleted && m_Bounds.Contains(m.Location))

						{

							return true;

						}

					}

				}

			}

Good luck and don't forget to recompile :)

-Rek-
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back