For the complete documentation index, see llms.txt. This page is also available as Markdown.

Statements, blocks, and comments

Braces group statements:

statements-and-blocks.gpc
main {
    if(get_val(PS5_L2)) {
        set_val(PS5_R2, 100);
    }
}

The compiler accepts omitted semicolons in many places, but use them consistently. Semicolons are mandatory as separators in a for header. A missing semicolon after return can also make the next line look like its expression.

// One-line comment

/*
    Block comment.
    Block comments cannot be nested.
*/

Use // when disabling a region that already contains block comments.

Last updated