This site requires JavaScript, please enable it in your browser!
Greenfoot back
chris553
chris553 wrote ...

2013/3/10

Breakout help

chris553 chris553

2013/3/10

#
I have an assignment that I need help with. The program has been provided but there is apparently errors in the program given to use so I cannot complete the assignment. Here is a link to the program, "https://www.dropbox.com/s/uysagdmvt9girai/breakout-blank.zip". I take no credit for this as it was created by Barbara Ericson of Georgia Tech. Our assignment is to create a new breakout game using the provided blank template. When I right click on brick and create new brick it gives me an error that says that it cannot find the variable color. I was told by my instructor that it has to be Color.BLUE for example. No matter what I put in their it still gives me an error. The exact error message is "Error: cannot find symbol - variable color". The variable color has in fact been instantiated so I do not know where this error is coming from. I am hoping one of you guys can help me as it is greatly appreciated. Thanks!!
danpost danpost

2013/3/10

#
did you try the following? java.awt.Color.BLUE (like your instructor probably said) BTW, this has nothing to do with the instantiated variable 'color'.
chris553 chris553

2013/3/10

#
java.awt.color has been imported at the beginning of the class so java.awt.Color.BLUE is not necessary. I guess instantiated wasn't the proper term. I meant the variable color has been declared. I have tried to do that and I tried it again and thank you for mentioning that because yes that worked. I swear I tried that and it didn't work. I guess I needed another person telling me to try it again. Thanks danpost.
You need to login to post a reply.