Can't change color of my robot

311 views
Skip to first unread message

bullse...@interia.pl

unread,
Dec 12, 2014, 12:58:45 PM12/12/14
to robo...@googlegroups.com
Hello. I am trying to change the color of my robot, but everytime i try to compile, it says "Color can't be resolved as variable". I am using the same stuff as in other robots, but it's not working.

Johannes Slotta

unread,
Dec 12, 2014, 6:14:10 PM12/12/14
to robo...@googlegroups.com

Hi, based on your description, it is hard to guess the code and the reason for the message. You seem to reference some variable "Color" that is not recognised by the compiler. It would be easier if you could create a (non)compiling minimal code sample able to reproduce the error, maybe you forgot some import statement or some definition, my magic crystal ball is still in repair ;-)

Am 12.12.2014 22:59 schrieb <bullse...@interia.pl>:
Hello. I am trying to change the color of my robot, but everytime i try to compile, it says "Color can't be resolved as variable". I am using the same stuff as in other robots, but it's not working.

--
You received this message because you are subscribed to the Google Groups "robocode" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robocode+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

fnl

unread,
Dec 14, 2014, 2:53:06 PM12/14/14
to robo...@googlegroups.com, bullse...@interia.pl
Hi,

Johannes is right when you suggest that you are missing an import statement.
Try to write this in the top of your source file, but after the 'package statement' if you got one:

import java.awt.Color;

Best regards,
- Flemming
Reply all
Reply to author
Forward
0 new messages