anyone know wat this Error

10/29/2011 08:02 magnon#1
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.Collections.Generic.Dictionary`2.ValueColle ction.CopyTo(TValue[] array, Int32 index)
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at System.Collections.Generic.ThreadSafeDictionary`2. safeUpdate()
at System.Collections.Generic.ThreadSafeDictionary`2. Remove(T1 key)
at Conquer_Online_Server.Client.GameState.ShutDown()
at Conquer_Online_Server.Client.GameState.Disconnect( )
at Conquer_Online_Server.Program.GameServer_AnnounceD isconnection(ISocketWrapper obj)
at Conquer_Online_Server.Network.Sockets.AsyncSocket. InvokeDisconnect(AsyncSocketWrapper Client)
at Conquer_Online_Server.Network.Sockets.AsyncSocket. AsyncReceive(IAsyncResult res)
Code:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Conquer_Online_Server.Game.Attacking.Handle.CanAttack(Entity attacker, Entity attacked, SpellInformation spell, Boolean melee)
   at Conquer_Online_Server.Game.Attacking.Handle.Execute()
   at Conquer_Online_Server.Game.Attacking.Handle..ctor(Attack attack, Entity attacker, Entity attacked)
   at Conquer_Online_Server.Network.PacketHandler.Attack(Attack attack, GameState client)
   at Conquer_Online_Server.Network.PacketHandler.HandlePacket(Byte[] packet, GameState client)
   at Conquer_Online_Server.Network.PacketHandler.HandleBuffer(Byte[] buffer, GameState client)
   at Conquer_Online_Server.Program.GameServer_AnnounceReceive(Byte[] arg1, ISocketWrapper arg2)
   at Conquer_Online_Server.Network.Sockets.AsyncSocket.AsyncReceive(IAsyncResult res)
10/29/2011 10:13 pro4never#2
If you posted the line of code where the error occurred it would be far more helpful.


My guess is you are either

A: attacking a monster which no longer exists in server monsters collection (something like Program.Monsters or Kernel.Monsters) or

B: You are attacking a player which is disconnected (Usually Kernel.Clients or Program.Clients)


All the error means is you are trying to access a number in an element that does not exist (dictionary,list or array). Note elements start at 0 not 1. First element = 0, second = 1, etc.

If you try to access an element which does not exist you get this error obviously.
10/30/2011 08:32 magnon#3
Code:
System.NullReferenceException: Object reference not set to an instance of an object.
   at Conquer_Online_Server.Game.Attacking.Handle.CanAttack(Entity attacker, Entity attacked, SpellInformation spell, Boolean melee)
   at Conquer_Online_Server.Game.Attacking.Handle.Execute()
   at Conquer_Online_Server.Game.Attacking.Handle..ctor(Attack attack, Entity attacker, Entity attacked)
   at Conquer_Online_Server.Network.PacketHandler.Attack(Attack attack, GameState client)
   at Conquer_Online_Server.Network.PacketHandler.HandlePacket(Byte[] packet, GameState client)
   at Conquer_Online_Server.Network.PacketHandler.HandleBuffer(Byte[] buffer, GameState client)
   at Conquer_Online_Server.Program.GameServer_AnnounceReceive(Byte[] arg1, ISocketWrapper arg2)
   at Conquer_Online_Server.Network.Sockets.AsyncSocket.AsyncReceive(IAsyncResult res)