*解析器错误*意外的符号字符串,期望类,委托,枚举,接口,部分或结构

时间:2015-06-11 22:13:49

标签: unity3d

使用UnityEngine; 使用System.Collections;

public class BaseCharacterClass {

private string characterClassName;
private string characterClassDescription;
//stats
private int stamina;
private int health;
private int magic;

}     public string(this is where the error is) CharacterClassName{ get{return characterClassName;} set{characterClassName = value;} public string CharacterClassDescription{ get{return characterClassDescription;} set {characterClassDescription = value;}

1 个答案:

答案 0 :(得分:2)

你太早关闭了课程

public class BaseCharacterClass {

private string characterClassName;
private string characterClassDescription;
//stats
private int stamina;
private int health;
private int magic;

\* } <-- Remove this *\ public string CharacterClassName{
        get{return characterClassName;}
        set{characterClassName = value;}
    public string CharacterClassDescription{
    get{return characterClassDescription;}
    set {characterClassDescription = value;}

} // <--- add this here