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

First mistakes to recognize

Declaring inside a block

main {
    int value;  // invalid: runtime variables must be top-level
}

Move int value; above init / main.


Confusing assignment and comparison

if(mode = 2) { }   // assigns 2; the condition is then true
if(mode == 2) { }  // compares; usually what was intended

Zen Studio Live warns about assignment in a condition, but write the intended operator.


Using the wrong letter case

PS5_CROSS, ps5_cross, and PS5_Cross are different names. Only the defined constant is valid.


Assuming a function changes its caller's variable

Function arguments are values held in local parameters:


Writing forever in an inner loop

main is already the repeating loop. Inner loops should complete quickly and have an obvious bound.

Last updated