Ошибка "Unexpected symbol in class, struct, or interface member declaration" - C#
Формулировка задачи:
Unity выдаёт ошибку: Assets/Scripts/Item.cs(11,36): error CS1519: Unexpected symbol `ItemType' in class, struct, or interface member declaration
Листинг программы
- using UnityEngine;
- using System.Collections;
- [System.Serializable]
- public class Item
- {
- public string ItemName;
- public string ItemDescription;
- public int ItemID;
- public int ItemPower;
- public int ItemSpeed;
- public int ItemType ItemType;
- public enum ItemType {
- Weapon,
- Consumable,
- Quest
- }
- }
Решение задачи: «Ошибка "Unexpected symbol in class, struct, or interface member declaration"»
textual
Листинг программы
- public int ItemType ItemType;
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д