Accessing Variables inside classes inside other classes?

Ok… I have this “character” class for an RPG style game I’m building… What I want to be able to do is to get the players abilities by using Character.Ability.Scores.Str. This is what I’ve somehow stumbled upon, as this is my first class attempt, and I don’t know IF it’s possible and how I would do it if it is…

Here’s my script so far…
“StatDataBase.GetBaseStats” is just getting an array of ability scores from the class and race

public class Character {           
        // Get a brand new level 1 character
        public Character(string Race, string Class) {
            int[] NewScores = StatDataBase.GetBaseStats(Race, Class);
            Ability.Scores.Str = NewScores[0];
            Ability.Scores.Dex = NewScores[1];
            Ability.Scores.Con = NewScores[2];
            Ability.Scores.Wis = NewScores[3];
            Ability.Scores.Int = NewScores[4];
            Ability.Scores.Cha = NewScores[5];
        }

        // Get a character with ability modifications
        public Character(string Race, string Class, int[] Modifiers) {
            Stats = StatDataBase.GetBaseStats(Race, Class);
            int Selection = 0;
            foreach (int item in Modifiers) {
                Stats[Selection] += Modifiers[Selection];
                Selection++;
            }
        }

        // can't access the variables in here when using 'Character.Ability.Scores.Str"
        public class Ability {
            public class Scores {
                static public int Str;
                static public int Dex;
                static public int Con;
                static public int Wis;
                static public int Int;
                static public int Cha;
            }
        }
    }

Please try to explain any and all help as I know nothing about creating Classes!

You aren’t too far off base, you basically just didn’t give the character an actual ability stat, and to you would do that like this.

 public class Character {
         public Ability abilities;
         public string race;
         public string charClass;
         // Get a brand new level 1 character
         public Character(string Race, string Class) {
             race = Race;
             charCLass = Class;
             int[] NewScores = StatDataBase.GetBaseStats(Race, Class);
             abilities = new Ability();
             abilities.scores.Str = NewScores[0];
             abilities.scores.Dex = NewScores[1];
             abilities.scores.Con = NewScores[2];
             abilities.scores.Wis = NewScores[3];
             abilities.scores.Int = NewScores[4];
             abilities.scores.Cha = NewScores[5];
         }
 public class Ability
 {
     public Scores scores = new Scores();
     public class Scores
     {
         public int Str;
         public int Dex;
         public int Con;
         public int Wis;
         public int Int;
         public int Cha;
     }
 }

My suggestion to you though, would be to create another class file for character classes, so you can have seperate info for each class and aren’t stuck trying to fudge some fake class out of a string name.

EDIT: Have you ever worked with Skript? I’m only asking because your code reflects a non-OOP influence, and I did Skript for minecraft servers for a while, and I gotta say it taught me some bad habits in coding.