my server not drop any thing

10/06/2011 11:49 alaa410#1
when i make the code //
my server not drop any thing

When the code and Make Add 2 Slash the server does not give me cps or any thing plz help me

the code this



Quote:
if (!Companion)
//MonsterInfo.Drop(killer); this is the code
ServerBase.Kernel.Maps[MapID].Floor[X, Y, MapObjType, this] = true;
if (killer.EntityFlag == EntityFlag.Player)
{
killer.Owner.IncreaseExperience(MaxHitpoints, true);
if (killer.Owner.Team != null)
{
foreach (Client.GameState teammate in killer.Owner.Team.Teammates)
{
if (ServerBase.Kernel.GetDistance(killer.X, killer.Y, teammate.Entity.X, teammate.Entity.Y) <= ServerBase.Constants.pScreenDistance)
{
if (killer.UID != teammate.Entity.UID)
{
uint extraExperience = MaxHitpoints / 2;
if (killer.Spouse == teammate.Entity.Name)
extraExperience = MaxHitpoints * 2;
byte TLevelN = teammate.Entity.Level;
if (killer.Owner.Team.CanGetNoobExperience(teammate))
{
if (teammate.Entity.Level < 137)
{
extraExperience *= 2;
teammate.IncreaseExperience(extraExperience, false);
teammate.Send(ServerBase.Constants.NoobTeamExperie nce(extraExperience));
}
}
else
{
if (teammate.Entity.Level < 137)
{
teammate.IncreaseExperience(extraExperience, false);
teammate.Send(ServerBase.Constants.TeamExperience( extraExperience));
}
}
byte TLevelNn = teammate.Entity.Level;
byte newLevel = (byte)(TLevelNn - TLevelN);
if (newLevel != 0)
{
if (TLevelN < 70)
{
for (int i = TLevelN; i < TLevelNn; i++)
{
teammate.Team.Teammates[0].VirtuePoints += (uint)(i * 3.83F);
teammate.Team.SendMessage(new Message("The leader, " + teammate.Team.Teammates[0].Entity.Name + ", has gained " + (uint)(i * 7.7F) + " virtue points for power leveling the rookies.", System.Drawing.Color.Red, Message.Team));
}
}
}
}
}
}
}
10/06/2011 13:52 F i n c h i#2
// means it doesn't matter, C# will not read that line.
10/06/2011 14:32 shadowman123#3
// is a comment state which means that the compiler ignore it and its usefull in making Titles for codes nothing else i guess ..wish i helped u enough
10/06/2011 16:23 m7mdxlife#4
lol....
10/06/2011 16:27 BaussHacker#5
// and /* */ is commentary.
10/06/2011 16:29 m7mdxlife#6
Quote:
Originally Posted by BaussHacker View Post
// and /* */ is commentary.
*i could have gone my whole life without knowing that*
10/06/2011 16:50 alaa410#7
but i will delete slash i get some error

Quote:
at Conquer_Online_Server.Database.MonsterInformation. Drop(Entity killer) in D
:\server\sqlxmlx\Source\Database\MonsterTable.cs:l ine 261
at Conquer_Online_Server.Game.Entity.Die(Entity killer) in D:\server\sqlxmlx\
Source\Game\Entity.cs:line 1692
at Conquer_Online_Server.Game.Attacking.Calculate.Mag ic(Entity Attacker, Enti
ty Attacked, SpellInformation SInfo) in D:\server\sqlxmlx\Source\Game\Attacking\
Calculate.cs:line 386
at Conquer_Online_Server.Game.Attacking.Calculate.Mag ic(Entity attacker, Enti
ty attacked, UInt16 spellID, Byte spellLevel) in D:\server\sqlxmlx\Source\Game\A
ttacking\Calculate.cs:line 411
at Conquer_Online_Server.Game.Attacking.Handle.Execut e() in D:\server\sqlxmlx
\Source\Game\Attacking\Handle.cs:line 124
at Conquer_Online_Server.Game.Attacking.Handle..ctor( Attack attack, Entity at
tacker, Entity attacked) in D:\server\sqlxmlx\Source\Game\Attacking\Handle.cs: li
ne 23
at Conquer_Online_Server.Game.Screen._timerCallBack(O bject scrObject) in D:\s
erver\sqlxmlx\Source\Game\Screen.cs:line 250
[02:09:40] System.NullReferenceException: Object reference not set to an instanc
e of an object.
at Conquer_Online_Server.Database.MonsterInformation. Drop(Entity killer) in D
:\server\sqlxmlx\Source\Database\MonsterTable.cs:l ine 261
at Conquer_Online_Server.Game.Entity.Die(Entity killer) in D:\server\sqlxmlx\
Source\Game\Entity.cs:line 1692
at Conquer_Online_Server.Game.Attacking.Calculate.Mag ic(Entity Attacker, Enti
ty Attacked, SpellInformation SInfo) in D:\server\sqlxmlx\Source\Game\Attacking\
Calculate.cs:line 386
at Conquer_Online_Server.Game.Attacking.Calculate.Mag ic(Entity attacker, Enti
ty attacked, UInt16 spellID, Byte spellLevel) in D:\server\sqlxmlx\Source\Game\A
ttacking\Calculate.cs:line 411
at Conquer_Online_Server.Game.Attacking.Handle.Execut e() in D:\server\sqlxmlx
\Source\Game\Attacking\Handle.cs:line 124
at Conquer_Online_Server.Game.Attacking.Handle..ctor( Attack attack, Entity at
tacker, Entity attacked) in D:\server\sqlxmlx\Source\Game\Attacking\Handle.cs: li
ne 23
at Conquer_Online_Server.Game.Screen._timerCallBack(O bject scrObject) in D:\s
erver\sqlxmlx\Source\Game\Screen.cs:line 250
10/06/2011 17:31 shadowman123#8
Some cases the coder just put // or /*/ to remind himself about smthing will be added to future or w.e for sm reason this doesnt mean that u delete them ..but check for the errors but anyways Drop problem is in Database/MonsterTable.cs ..
10/06/2011 18:21 BaussHacker#9
Quote:
Originally Posted by shadowman123 View Post
Some cases the coder just put // or /*/ to remind himself about smthing will be added to future or w.e for sm reason this doesnt mean that u delete them ..but check for the errors but anyways Drop problem is in Database/MonsterTable.cs ..
It could also be because you have something that currently is not working and that you will fix later or some old codes that you're not using anymore, but still got to use as reference etc. However it would be more common to use [Obsolete] for that, because it tells newer developers they should not use it.