\b;Instruction \c;factory\n;
Syntaxe:
\s;\c;factory ( cat, program, object );\n;

Starts a construction of a bot of a given \l;category\u cbot\category; and runs a specified program on it after the construction is finished.

\t;cat: \c;\l;int\u cbot\int;\n;
\l;Catégorie\u cbot\category; du robot à construire.

\t;program: \c;\l;string\u cbot\string;\n; (valeur par défaut: \c;""\n;)
Program that will be run on the bot after factory finishes the construction. This can be either a \l;public\u cbot\public; \l;function\u cbot\function;, a \l;filename\u cbot\file; or raw code.

\t;\l;object\u cbot\object;
\l;BotFactory\u object\factory;, nearest by default.

\t;Type du retour: \c;\l;entier (int)\u cbot\int;\n;
Normalement, une erreur arrête le programme. Vous pouvez empêcher le programme de s'arrêter en cas d'erreur en utilisant l'instruction \c;\l;errmode\u cbot\errmode;(0)\n;. Une valeur différente de zéro en cas d'erreur est alors retournée par \c;factory()\n;.
\c;== 0 \n;La construction a démarré avec succès
\c;!= 0 \n;La construction n'a pu démarrer (par ex. pas de \l;titane\u object\titan; dans l'usine ou le type de robot demandé n'a pas été recherché)

\t;Voir aussi
\c;\l;researched\u cbot\researched;\n;, \c;\l;wait\u cbot\wait;\n;.
\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.
