Google tells me to define except....

04/23/2020 11:21 denominator#1
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 :/
04/23/2020 15:52 turk55#2
If you can build it, you can debug it
04/23/2020 16:40 Super Aids#3
Set a breakpoint and step through the code and check what the fuck 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.
04/25/2020 02:03 denominator#4
So I decided to download it again from the original source and hey presto I am able to debug it now lol