Trouble with the Switch Function
Hello Community,
I am have trouble with this switch code. I receive this error message when I try compiling. I am trying to tell it to switch to certain methods depending on the circumstance in the game. This is suppose to be a very simple Tic Tac Toe game using only the GUI system. I have highlighted the code that I am have trouble with. Any help would be greatly appreciated.
Thank you!
error CS0151: A switch expression of type `GameState' cannot be converted to an integral type, bool, char, string, enum or nullable type
Answer by UnityCoach · Apr 10, 2017 at 08:56 PM
You must have an enum GameState declared somewhere, in the form of
public enum GameState {Opening, MultiPlayer, GameOver};
I don't see this anywhere in your code.
Your answer
Follow this Question
Related Questions
Timer wont work 0 Answers
Getting weird error message!?!?!? 1 Answer
Make enemy patrol without Nav Points? 0 Answers
tagged objects problem 0 Answers
random spawn enemy problem 0 Answers