colobot-data/help/cbot/E/pencolor.txt

16 lines
699 B
Plaintext
Raw Permalink Normal View History

2015-07-26 19:36:09 +00:00
\b;Instruction \c;pencolor\n;
Syntax:
\s;\c;pencolor ( color );\n;
The instruction \c;pencolor();\n; instructs the bot to change the color of the pencil.
\t;color: \c;\l;int\u cbot\int;\n; (default value: \c;Black\n;)
\l;Color name\u cbot\colors;.
\t;Return value: \c;\l;int\u cbot\int;\n;
Normally an error stops the program. You can prevent the program from stopping on errors by using the \c;\l;errmode\u cbot\errmode;(0)\n; instruction. A value different from zero if an error occurred is then returned by \c;pencolor();\n;.
\c;== 0 \n;The color was changed
\c;!= 0 \n;The instruction did not work
\t;See also
\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.