Colobot Wiki

When you define a variable, you must give two elements:

1) a name 2) a type

Once you defined a variable, you can use it to put information in it. However, the information that a variable can contain must always be of the correct type: a variable of type float can not contain a string, etc.

In a program, the name of a type is always displayed like that: type. If the name of a type is not highlighted, this means that the name is misspelled. Type names are always written with lower case characters. Here is a list of the different types:


For a whole number (12, -500, etc.).


For a real number (12, 3.14, 0.2, -99.98, etc.).


For a boolean variable, that can only take the values true or false.


For texts ("Hello!", "No object found", etc.)

See also[]

Programming, types and categories.