I’m still new at C# and I’ve taken this code from a tutorial when they were in unity 4. I rewrote the code like they had it for the line that the error is being produced and I’m still getting the same error. In character building error I was trying some things and forgot to delete out the semicolons but that still didn’t fix the problem. I’ve attached the code and the error again. I’m hoping for a more comprehensive answer.
Also does the public int for strength agility etc. need to be capitalized like Strength Agility etc.?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BaseCharacterClass
{
private string characterClassName;
private string characterClassDescription;
//Stats
private int strength;
private int agility;
private int wisdom;
private int intellegence;
private int charisma;
private int commonSence;
private int wit;
private int charm;
private int shrewd;
private int dexterity;
private int stamina;
}
public string CharacterClassName{
get { return characterClassName; }
set { characterClassName == value; }
}
public string CharacterClassDescription{ get; set; }
public int Strength { get; set; }
public int Agility { get; set; }
Assets/Scripts/BaseCharacterClass/BaseCharacterClass.cs(22,11): error CS1525: Unexpected symbol string', expecting
class’, delegate',
enum’, interface',
partial’, or `struct’