Loads of problems! 5165

02/28/2010 00:43 .Beatz#1
Hey guys i got a few problems in my 6165 server. if anyone can help woule be much appreciated....

1> Sometimes chars done save.

Someone said somethign about added mobs already for this one >
Quote:
System.ArgumentException: Item has already been added. Key in dictionary: 'NewestCOServer.Game.Mob' Key being added: 'NewestCOServer.Game.Mob'
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at NewestCOServer.Features.SkillsClass.SkillUse.GetMo bTargets(UInt32 Single) in C:\rikardo updated\Features\Skills.cs:line 265
at NewestCOServer.Features.SkillsClass.SkillUse.GetTa rgets(UInt32 Single) in C:\rikardo updated\Features\Skills.cs:line 147
Dont know what this is!
Quote:
System.NullReferenceException: Object reference not set to an instance of an object.
at NewestCOServer.PacketHandler.Handle(GameClient GC, Byte[] PData) in C:\rikardo updated\PacketHandler.cs:line 723
Dont know what this is either :(
Quote:
System.ArgumentException: Destination array is not long enough to copy all the items in the collection. Check array index and length.
at System.ThrowHelper.ThrowArgumentException(Exceptio nResource resource)
at System.BitConverter.ToInt16(Byte[] value, Int32 startIndex)
at NewestCOServer.Main.GameWorker.DataHandler(StateOb j StO, Byte[] Data) in C:\rikardo updated\Main\GameWorker.cs:line 65
02/28/2010 12:10 ph03nixx#2
have you installed the DB correctly? the mob one looks like the mobs wont load correctly either. the one in packtehandler.cs looks like that it cant do all the packters and the client cant find them. and the third one i cant make anything out of it. but i think i can help you when you explain whats really wrong.
like can you log in the game?
have you tried installing the source again?
02/28/2010 12:17 .Beatz#3
Quote:
Originally Posted by ph03nixx View Post
have you installed the DB correctly? the mob one looks like the mobs wont load correctly either. the one in packtehandler.cs looks like that it cant do all the packters and the client cant find them. and the third one i cant make anything out of it. but i think i can help you when you explain whats really wrong.
like can you log in the game?
have you tried installing the source again?
I can log into the game and so can everybody else.
I have reinstalled the source again.
the problem is mainly that characters sometimes dont save properly. I dont know why that is. My character and some of the players and a PM or 2 characters always save no problem.
Thanks for the help xD
02/28/2010 13:35 Korvacs#4
Heres an example of your "object reference not set to an instance of an object" exception:

Code:
            DMapLoader.DMapServer DmapHandler;
            DmapHandler.ConquerPath = @"C:\Conquer Example\";
            DmapHandler.Load();
DmapHandler has not been defined, it has been declared as being a DMapServer, however at the moment it is still null, for it to work you would need this:


Code:
            DMapLoader.DMapServer DmapHandler = new DMapLoader.DMapServer();
            DmapHandler.ConquerPath = @"C:\Conquer Example\";
            DmapHandler.Load();
Now the object atually has a value and that exception will not be thrown.

This only applies to instances of objects, static objects do not require this in most cases.
02/28/2010 14:11 .Beatz#5
Quote:
Originally Posted by Korvacs View Post
Heres an example of your "object reference not set to an instance of an object" exception:

Code:
            DMapLoader.DMapServer DmapHandler;
            DmapHandler.ConquerPath = @"C:\Conquer Example\";
            DmapHandler.Load();
DmapHandler has not been defined, it has been declared as being a DMapServer, however at the moment it is still null, for it to work you would need this:


Code:
            DMapLoader.DMapServer DmapHandler = new DMapLoader.DMapServer();
            DmapHandler.ConquerPath = @"C:\Conquer Example\";
            DmapHandler.Load();
Now the object atually has a value and that exception will not be thrown.

This only applies to instances of objects, static objects do not require this in most cases.
Thanks for this i will go and do this now