Mschri
1
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
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.