2015-06-11 37 views
-2

;使用System.Collections的 ;*解析器錯誤*意外的符號字符串,期望使用UnityEngine的類,委託,枚舉,接口,部分或結構

公共類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

你關閉你的類太早

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 
相關問題