Colobot Wiki


pencolor ( color );

The instruction pencolor(); instructs the bot to change the color of the pencil.

color: int (default value: Black)[]

Color name

Return value: int[]

Normally an error stops the program. You can prevent the program from stopping on errors by using the errmode(0) instruction. A value different from zero if an error occurred is then returned by pencolor();.

== 0 The color was changed

!= 0 The instruction did not work

See also[]