Pass multiple parameters to button function and...

Hello community,
i am new to unity and c# and like to know how to accomplish the following:

public void SpentPoints(string attrib_amount)
    {
        string[] splitted = attrib_amount.Split(':');
        string attribute  = FirstLetterToUpper(splitted[0]);
        string t_amount   = splitted[1];

        int amount;
        int.TryParse(t_amount, out amount);

        if (newPlayer.PlayerClass != null)
        {
            if (amount > 0 && pointsToSpent > 0)
            {
                newPlayer.attribute = attribute + amount; // <---- PROBLEM
                pointsToSpent  = pointsToSpent.amount;
            }
        }
    }

Assets/Scripts/Stats/CreatePlayer.cs(134,27): error CS1061: Type BasePlayerClass' does not contain a definition for attribute’ and no extension method attribute' of type BasePlayerClass’ could be found…

Would be nice if someone can point me to the right direction.
Greets R.

Your error just means newPlayer doesn’t contain attribute. So you have no field or property called attribute. But no clue what newPlayer is, so can’t help you much there. Just make sure you have attribute in that class.

Also note that it could be there, but not public.