//to avoid duplicating code we can just have a milestonelist variable that holds the current milestone being called? What if two are called at the same time tho?
 public void ranktracker(string milestonename, int tracker)
 {
     for (int x = 0; x < milestonelist.milestones.Count; x++)                                   //NOTE : x is only for counting through our individual milestones,
     {
         if (milestonelist.milestones[x].MilestoneName == milestonename)                        //checks our milestone for it's name
         {
             for (int y = 0; y < milestonelist.milestones[x].MilestoneRequirements.Length; y++) //goes through all our milestone rankings
             {
                 if (tracker == milestonelist.milestones[x].MilestoneRequirements[y])           //checks which milestone ranking our current value is equal to by going through them all
                 {
                     if (y == milestonelist.milestones[x].currentrank)
                     {
                         TotalCP += milestonelist.milestones[x].CP[y];                                                                                                                                                                     //Adds to our CP from our CP selection
                         ui_managerScript.Achievementdetermined(milestonelist.milestones[x].MilestoneName, milestonelist.milestones[x].CP[y], milestonelist.milestones[x].MilestoneRequirements[milestonelist.milestones[x].currentrank]); //activate and set notifications
                         milestonelist.milestones[x].currentrank += 1;                                                                                                                                                                     //increases our rank
                     }
                 }
             }
         }
     }
 }