Choosing based on a condition: if, then, else

The if statement can return two different values. It is important that these two values are of the same type; otherwise, the compiler will return an error:

Ninox
if a > 10 then
    "important value";
else
    "low value";
end;

To check such code without running it, paste it into Ninext's Console and click Check (Ctrl + Shift + Enter, ⌘ + Shift + Enter on Mac): if the two values do not have the same type, the error is reported and underlined in the code; when you hover over the underlined passage, a tooltip says which type each of the two branches gives.