albert albert

albert albert

  • NA
  • 524
  • 0

InvaderImage

Mar 27 2011 9:00 AM
HI,

I have this:

[code]
 private Bitmap InvaderImage(int animationCell)
       // public void DisplayImage()
        {
           
           switch(InvaderType)
            {
                case Type.Bug:                
           
                switch(animationCell)
                {
                    case 0: StarInvader2.Properties.Resources.bug1; 
                        break;
                    case 1:Properties.Resources.bug2;
                        break;
                    case 2: Properties.Resources.bug3;
                        break;
                    case 3: Properties.Resources.bug4;
                        break;
                    default:
                        break;
                }
           
            }
           return image;

       
        }//End method
[/code]

But then I get this error:

Error    3    Only assignment, call, increment, decrement, and new object expressions can be used as a statement    C:\Users\savantKing\Desktop\StarInvader2\Invader.cs    139    29    StarInvader2


Answers (10)