I Keep Getting Error CS0052
I Keep Getting this weird error when i try to do a simple enum. This is the error - "Assets/Scripts/Dude.cs(33,27): error CS0052: Inconsistent accessibility: field type Dude.WeaponType' is less accessible than field
Dude.weapontype'
Code-
enum WeaponType {
Staff, Dagger, Mace, Sword, Banana
}
public WeaponType weapontype;
void Update () {
if (weapontype == WeaponType.Banana) {
print ("Not much of a weapon if you ask me...");
}
I need help!
Comment
weapontype is public
WeaponType isn't
Change that line to
public enum WeaponType {
And see if it fixes it, if you're outside in public you're more accessible as well, just think of it like that!
Your answer
Follow this Question
Related Questions
how to save time and take the next variable in enum? 1 Answer
C# missingReferenceException when comparing enums 0 Answers
CS1513 and CS1022 problem 1 Answer
error CS0201 1 Answer