Help me in my C# 5533 Source

03/31/2012 15:27 mina1893192#1
I've been trying to fix when red name drops gears when they get killed and blackname gets arrested
the redname player and blackname drops everything they wearing then i see lots of errors in my source window
tell me if i have something wrong in this

Quote:
Programe.cs
if (client.Entity.PKPoints > 29 && client.Entity.Dead == true)
{
foreach (var Item in client.Entity.Owner.Equipment.Objects)
{
if (Item != null)
{
//5 = LeftHand, 9 = Garment, 12 = Horse lol
if (Item.Position == 9
return;
if (Item.Position == 5)
if (Item.ID.ToString().StartsWith("105"))
return;
if (ServerBase.Kernel.Rate(35 + (int)(client.Entity.PKPoints > 99 ? 75 : 0)))
{
ushort x = client.Entity.X, y = client.Entity.Y;
Game.Map Map = ServerBase.Kernel.Maps[client.Entity.MapID];
if (Map.SelectCoordonates(ref x, ref y))
{
client.Entity.Owner.Equipment.RemoveToGround(Item.Position);
var infos = Database.ConquerItemInformation.BaseInformations[(uint)Item.ID];
Network.GamePackets.FloorItem floorItem = new Network.GamePackets.FloorItem(true);
floorItem.Item = Item;
floorItem.ValueType = Network.GamePackets.FloorItem.FloorValueType.Item;
floorItem.ItemID = (uint)Item.ID;
floorItem.MapID = client.Entity.MapID;
floorItem.MapObjType = Game.MapObjectType.Item;
floorItem.X = x;
floorItem.Y = y;
floorItem.Type = Network.GamePackets.FloorItem.DropDetain;
floorItem.OnFloor = Time32.Now;
floorItem.ItemColor = floorItem.Item.Color;
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
while (Map.Npcs.ContainsKey(floorItem.UID))
floorItem.UID = Network.GamePackets.FloorItem.FloorUID.Next;
client.Entity.Owner.SendScreenSpawn(floorItem, true);
Database.DetainedItemTable.DetainItem(Item, client.Entity.Owner, client.Entity.Killer.Owner);
break;
}
}
}
}
}
if (PKPoints > 99)
{
if (client.Entity.Killer.Name != "")
ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(client.Entity.Name + " has been captured by " + client.Entity.Killer.Name + " and sent in jail! The world is now safer!", System.Drawing.Color.Red, Conquer_Online_Server.Network.GamePackets.Message.Talk), ServerBase.Kernel.GamePool.Values);
else
ServerBase.Kernel.SendWorldMessage(new Network.GamePackets.Message(client.Entity.Name + " has been captured and sent in jail! The world is now safer!", System.Drawing.Color.Red, Conquer_Online_Server.Network.GamePackets.Message.Talk), ServerBase.Kernel.GamePool.Values);
client.Entity.Teleport(6000, 30, 76);
}
04/01/2012 02:58 samehvan#2
it must give you errors , i am sure it gives you collection modified error

you have two ways to fix this
1-Copy the Equipment items to another data holder and then do your work with it
2-make a uid list to save the uids for the items you wanna drop then foreach(uint I in uids) // drop them here
04/01/2012 16:10 injection illusion logic#3
that's a code not an errors , i wont be able to compile without the rest of the codes
but here
try to re-add the dlls at the source folder (this problem is so common in 5533)
if this works come back and lemme know that im awesome :P
04/01/2012 16:56 BendOverForMe#4
im a noob in C# if you upload these files
program.cs Entity.cs and Handles.cs
im sure one of our great coders can help you

Thanks so much best regards