Discussion:
Can't change color of my robot
b***@interia.pl
2014-12-12 17:58:45 UTC
Permalink
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Johannes Slotta
2014-12-12 23:14:10 UTC
Permalink
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 ;-)
Post by b***@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
For more options, visit https://groups.google.com/d/optout.
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
fnl
2014-12-14 19:53:06 UTC
Permalink
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
Post by b***@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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...