Register for your free account! | Forgot your password?

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

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

Google tells me to define except....

Discussion on Google tells me to define except.... within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2010
Posts: 869
Received Thanks: 75
Google tells me to define except....

Code:
System.Collections.Generic.KeyNotFoundException
  HResult=0x80131577
  Message=The given key was not present in the dictionary.
  Source=mscorlib
  StackTrace:
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at LordsRoad.Game.JiangHu.CreateStatusAtributes(Entity client) in C:\lordsroadconquer\lordsroadconquer\Network\GamePackets\JiangHu\JiangHu.cs:line 396
   at LordsRoad.Database.JiangHu.LoadJiangHu() in C:\lordsroadconquer\lordsroadconquer\Database\JiangHuTable.cs:line 196
   at LordsRoad.Program.LoadServer(Boolean KnowConfig) in C:\lordsroadconquer\lordsroadconquer\System\Program.cs:line 303
   at LordsRoad.Program.Main() in C:\lordsroadconquer\lordsroadconquer\System\Program.cs:line 406
So I've been googling this error but I'm unsure as to what it is I need to add to the source :/

Code:
public void CreateStatusAtributes(Game.Entity client)
        {
            uint oldInner_Strength = Inner_Strength;
            Inner_Strength = 0;
            foreach (var nstage in Stagers)
            {
                if (!nstage.Activate) continue;

                var atr = nstage.Stars.Where(p => p.UID != 0).ToArray();

                byte count_doble = 0;

                Dictionary<uint, List<JiangStages.Star>> alignementstars = new Dictionary<uint, List<JiangStages.Star>>();
                List<JiangStages.Star> normalstarts = new List<JiangStages.Star>();
                ushort counts_alignements = 0;
                for (byte x = 0; x < atr.Length; x++)
                {
                    var atribut = atr[x];
                    count_doble = 0;
                    bool wasadd = false;
                    for (byte y = (byte)(x + 1); y < atr.Length; y++)
                    {
                        var atr2nd = atr[y];
                        if (atr2nd.Typ == atribut.Typ)
                        {
                            if (!wasadd)
                            {
                                if (!alignementstars.ContainsKey(counts_alignements))
                                {
                                    alignementstars.Add(counts_alignements, new List<JiangStages.Star>());
                                    alignementstars[counts_alignements].Add(atribut);
                                }
                            }
                            if (!alignementstars.ContainsKey(counts_alignements))
                            {
                                alignementstars.Add(counts_alignements, new List<JiangStages.Star>());
                                alignementstars[counts_alignements].Add(atr2nd);
                            }
                            else
                                alignementstars[counts_alignements].Add(atr2nd);
                            wasadd = true;
                            x = y;
                            count_doble++;
                        }
                        else
                        {
                            break;
                        }
                    }
                    uint counts = 1;
                    if (count_doble != 0)
                    {
                        counts = (byte)(count_doble + 1);
                        counts_alignements++;
                    }
                    if (counts == 1)
                        normalstarts.Add(atribut);

                }
                byte percent = (byte)Database.JiangHu.AlignmentExtraPoints(count_doble);
                foreach (var allignement in alignementstars.Values)
                {
                    for (int i = 0; i < allignement.Count; i++)
                    {

                        Database.JiangHu.Atribut Atri_bas = Database.JiangHu.Atributes[allignement[i].UID]; <<---error from this
                        if (client != null)
                            IncreaseStatus(client, (JiangStages.AtributesType)Atri_bas.Type, (ushort)((Atri_bas.Power + (Atri_bas.Power * percent) / 100)));
                    }

                }
                count_doble = 0;
                foreach (var allignement in alignementstars.Values)
                    CalculateInner_StrengthAlignements(allignement);
                for (int x = 0; x < normalstarts.Count; x++)
                {
                    Database.JiangHu.Atribut Atri_bas = Database.JiangHu.Atributes[normalstarts[x].UID];
                    if (client != null)
                        IncreaseStatus(client, (JiangStages.AtributesType)Atri_bas.Type, (ushort)Atri_bas.Power);
                    Inner_Strength += Database.JiangHu.GetStatusPoints(normalstarts[x].Level);
                }
            }
            if (oldInner_Strength != Inner_Strength)
                JiangHuRanking.UpdateRank(this);
        }
I can't debug the source yet I can build it without errors :/
denominator is offline  
Old 04/23/2020, 15:52   #2
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,567
Received Thanks: 634
If you can build it, you can debug it
turk55 is offline  
Old 04/23/2020, 16:40   #3
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 940
Set a breakpoint and step through the code and check what the **** is missing.

By looking at that for 3 seconds I can already tell you that the data is not added correctly to alignementstars and that is your problem.
Super Aids is offline  
Thanks
1 User
Old 04/25/2020, 02:03   #4
 
elite*gold: 0
Join Date: Aug 2010
Posts: 869
Received Thanks: 75
So I decided to download it again from the original source and hey presto I am able to debug it now lol
denominator is offline  
Reply


Similar Threads Similar Threads
which packet tells client entity has left range?
01/22/2011 - CO2 Programming - 9 Replies
I raised this question because i cannot figure out which packet actually informs the client that a particular entity has left the char's detectable range. I looked up korvac's doc, it's slightly outdated. The first few fields are most packets are still valid, but the latter fields are not quite accurate now. Anyway, i realized that the remove entity packet type of general data is sent to client when an entity is completely removed from game; Eg, a mob is killed, a client dc'ed. If a...
Horse Color (This Program Tells You Your Horse's EXACT Color Values)
10/21/2009 - CO2 Exploits, Hacks & Tools - 35 Replies
CURRENTLY: WORKING (Patch 5157) Alright guys, finally got around to updating and fixing this program... the way it works now is, just run the program, equip the horse you want to look at, and it'll show you it's Color Stats... in future versions I will be making it so u can equip one horse, then another, and it'll tell you what each horse's value is AND what would be the result if u combined them... and maybe even a little further into the future I will release a program that'll allow you to...
History tells us...
06/09/2008 - Off Topic - 3 Replies
we have evolved.... from "scratching " the earth to working with machines and create machines,programs to "work for us"(manual labour-->the age of automatisation) we call it PROGRESS What do you call the same process repeated in a virtual environment(like a game?)?
+1 karma if somone tells move
12/15/2006 - Ragnarok Online - 7 Replies
if u see on the bottom where my signiture is if u know can u tell me wat class and move it is if its on aprivate server can u tell me wat server it is its a simpkle qestion i wil reward +1 karam



All times are GMT +2. The time now is 04:38.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 33E6kMtxYa7dApCFzrS3Jb7U3NrVvo8nsK
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

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