OK...
Your
switch
block uses
UserOption
which is declared as:
ShotgunOption UserOption;
But your
case
statements all use strings:
case "SHOOT":
...
case "RELAOD":
...
case "SHIELD"
So unless ShotgunOption is actually a string (which it isn't, string is a sealed class) means that you can't directly compare it's values to strings. It's liek trying to compare integers to strings - would you expect
if (123 == "hello!")
{
...
To compile, or even make any sense in the real world? :laugh:
What you're doing is in fact exactly that, I suspect: ShotgunOption is almost certainly an
enum
- which means that it's really an integer, but with added names.
I suspect that what you want to try is this:
case ShotgunOption.Shoot:
...
case ShotgunOption.Reload:
...
case ShotgunOption.Shield
Or at least something very similar!