Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 10:15

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



coemu console error???

Discussion on coemu console error??? within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 60
coemu console error???

Code:
[GameServer]
System.Collections.Generic.KeyNotFoundException: The given key was not present i
n the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at CoEmu_v2_GameServer.Connections.ClientSocket.DropItems(Int32 howmany) in C
:\Documents and Settings\Administrator\My Documents\5095 source\coemu\CoEmu v2 G
ameServer\Connections\ClientSocket.cs:line 422
   at CoEmu_v2_GameServer.Entities.Character.set_Dead(Boolean value) in C:\Docum
ents and Settings\Administrator\My Documents\5095 source\coemu\CoEmu v2 GameServ
er\Entities\Character.cs:line 44
   at CoEmu_v2_GameServer.Calculations.Calculation.doPlayer(Monster Attacker, Cl
ientSocket ASocket, Int32 Damage, Int32 AType) in C:\Documents and Settings\Admi
nistrator\My Documents\5095 source\coemu\CoEmu v2 GameServer\Calculations\doMons
terPlayer.cs:line 291
   at CoEmu_v2_GameServer.Entities.Monster.AttackMove(Int32 Target, Boolean Firs
t) in C:\Documents and Settings\Administrator\My Documents\5095 source\coemu\CoE
mu v2 GameServer\Entities\Monster.cs:line 934
Anyone know what caused this so i know where to fix ??
LegalConquer is offline  
Old 03/03/2010, 17:46   #2
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,000
Cause of this problem: The given key was not present in the dictionary.

The error is pretty straightforward, you're missing a key from the dictionary. I'm sure what operations you're trying to process. (Delete/Access). What I'm guessing is that there's line like

PHP Code:
Dictionary.Remove(Key);
or 
Value Dictionary[Key]; 
what you need to do is to have a check before accesing the value such as:
PHP Code:
if(Dictionary.Contains(Key))
    
Dictionary.Remove(Key); 
tanelipe is offline  
Old 03/03/2010, 17:49   #3
 
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 60
i found the code but the code seems to be doing what you would expect it to do find remove and delete 0.0

Code:
                if (!Nano.ItemFloor.ContainsKey(IG.UID))
                {
                    Database.Database.DeleteItem(Item.UID);
                    Client.Inventory.Remove(Item.UID);
LegalConquer is offline  
Old 03/03/2010, 18:22   #4
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,000
It never checks whether the item actually exists in the Inventory or not. Add this

PHP Code:
if(Client.Inventoy.Contains(ItemUID))
    
Client.Inventory.Remove(Item.UID); 
However I think it should stop processing what it's doing incase the item isn't on inventory. (I'm not sure what procedure this code is part of so I have no idea how it's supposed to function.)
tanelipe is offline  
Old 03/03/2010, 18:27   #5
 
elite*gold: 0
Join Date: Sep 2009
Posts: 321
Received Thanks: 60
Quote:
Originally Posted by tanelipe View Post
It never checks whether the item actually exists in the Inventory or not. Add this

PHP Code:
if(Client.Inventoy.Contains(ItemUID))
    
Client.Inventory.Remove(Item.UID); 
However I think it should stop processing what it's doing incase the item isn't on inventory. (I'm not sure what procedure this code is part of so I have no idea how it's supposed to function.)
thanks im sure thats more than enough info :P ive only been working with C# and this for under a month so its best to work most of it out my self but i do get stuck :P thanks
LegalConquer is offline  
Old 07/27/2010, 10:50   #6
 
elite*gold: 0
Join Date: Jul 2010
Posts: 9
Received Thanks: 1
I have same problem.
where should i find this lines to repair or change ?
bogdnlaszlo is offline  
Old 07/27/2010, 13:30   #7
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Exclamation

Quote:
Originally Posted by bogdnlaszlo View Post
I have same problem.
where should i find this lines to repair or change ?
If you cant use the search button in C# then please stop trying to make a server.
.Beatz is offline  
Thanks
1 User
Old 07/27/2010, 14:30   #8
 
elite*gold: 0
Join Date: Jul 2010
Posts: 9
Received Thanks: 1
Quote:
Originally Posted by mattyc2580 View Post
If you cant use the search button in C# then please stop trying to make a server.
Thanks for advice but i asked about wich file is
bogdnlaszlo is offline  
Old 07/27/2010, 14:32   #9
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
click search "Entire Solution"
Fish* is offline  
Reply


Similar Threads Similar Threads
GM Console Error?
05/23/2010 - Silkroad Online - 10 Replies
Well to make it quick, i just enabled the gm console but when i type /camera it doest appear the box in the right that says next previous draw or whatever... and /warp doesnt work either for me :S
Hey Small console error coemu...
03/13/2010 - CO2 Private Server - 4 Replies
------------------------------------- Welcome to euroco Projact Source is created By legalconquer Source work on client 5095+ Start ------------------------------------- Loaded: 8225 items in 172MS Loaded: 421 item plus data in 47MS Creating Game Maps.. Loaded 170 Maps
Console Error
08/30/2009 - CO2 Private Server - 8 Replies
MySql.Data.MySqlClient.MySqlException: Connection unexpectedly terminated ---> System.ArgumentOutOfRangeException: Non-negative number required. Parameter name: count at System.IO.BufferedStream.Read(Byte array, Int32 offset, Int32 count) at MySql.Data.MySqlClient.PacketReader.Read(Byte& buffer, Int64 pos, Int64 len) --- End of inner exception stack trace --- at MySql.Data.MySqlClient.PacketReader.Read(Byte& buffer, Int64 pos, Int64 len) at...
[Release]Console Commands with a bit of color [CoEmu V2]
07/19/2009 - CO2 PServer Guides & Releases - 9 Replies
Alright here it is dident take to long to make Umm there is one thing you will have to do that is not very hard and that is add a defintion for CSocket This is for the Game Server btw Ok To start off Add To Nano.cs using System.Diagnostics; Then add using System.Windows.Forms;



All times are GMT +2. The time now is 10:15.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.