0% found this document useful (0 votes)
10 views

Help

This document lists various options for compiling scripts for the Grand Theft Auto games, including options for output format, data directories, language features, machine options, and error handling. Key options include -o to specify an output file, --cs for a CLEO script output, --config to specify a configuration like gta3 or gtavc, -fcleo to enable CLEO features, and -Werror to treat warnings as errors.

Uploaded by

rileymic001
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Help

This document lists various options for compiling scripts for the Grand Theft Auto games, including options for output format, data directories, language features, machine options, and error handling. Key options include -o to specify an output file, --cs for a CLEO script output, --config to specify a configuration like gta3 or gtavc, -fcleo to enable CLEO features, and -Werror to treat warnings as errors.

Uploaded by

rileymic001
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Options:

-o <file> Place the output into <file>.


--cs Outputs a CLEO script. This also sets -fcleo.
--cm Outputs a CLEO custom mission.
This also sets -fcleo and -fmission-script.
--config=<name> Which compilation configurations to use (gta3,gtavc,
gtasa). This effectively reads the data files at
'/config/<name>/' and sets some appropriate flags.
--datadir=<path> Path to where IDE and DAT files are in.
The compiler will still try to behave properly
without this, but this is still recommended.
--levelfile=<name> Name of the level data file in the data directory.
--add-config=<path> Adds an additional XML definition file.
If the path is not absolute or starts with './' or
'../', uses a path relative to 'config/<name>/'.
-pedantic Warns when using extensions not in R* language.
-pedantic-errors Errors when using extensions not in R* language.
--guesser Allows the use of language features not completly
known or understood by the modding community.
-D <name> Defines the preprocessor directive <name>.
--define=<name> Ditto.
-U <name> Undefines the preprocessor directive <name>.
--undefine=<name> Ditto.
-O Enables optimizations.
-emit-ir2 Emits a explicit IR based on Sanny Builder syntax.
-fsyntax-only Only checks the syntax, i.e. doesn't generate code.
--recursive-traversal Disassembler scans the code by the means of a
recursive traversal instead of linear-sweep.
--expect-var=<info>

Language Options:
-fswitch Enables the SWITCH statement.
-farrays Enables the use of arrays.
-fconst Enables the use of CONST_INT and CONST_FLOAT.
-ftext-label-vars Enables VAR_TEXT_LABEL and VAR_TEXT_LABEL16.
-fskip-cutscene Enables the use of SKIP_CUTSCENE_START.
-fscript-name-check Checks for duplicate SCRIPT_NAMEs.
-fentity-tracking Tracks entity types in variables.
-fbreak-continue Allows the use of BREAK and CONTINUE in all
statements, including WHILE and REPEAT.
-fstreamed-scripts Enables the use of streamed scripts and generates an
associated script.img archive.
-fscope-then-label When combined with -pedantic, outputs a error message
whenever a label is used before a curly bracket
instead of after.
-funderscore-idents Allows identifiers to begin with a underscore.
-flocal-var-limit=<n> The index limit of local variables.
-fmission-var-limit=<n> The index limit of mission local variables. Defaults
to -flocal-var-limit if not set. Use -1 to unset.
-fmission-var-begin=<n> Mission variables will start from the index <n>.
-ftimer-index=<n> The local variable index of TIMERA.
-fswitch-case-limit=<n> The limit on the number of CASE in a SWITCH.
-farray-elem-limit=<n> The limit of array elements in a single array.
-frelax-not Allows the use of NOT outside of conditions.
-fcleo Enables the use of CLEO features.
-fmission-script Compiling a mission script.

Machine Options:
-mno-header Does not generate a header on the output SCM.
-mheader=<version> Generates the specified header version (gta3,gtavc,
gtasa).
-mlocal-offsets Label offsets are referenced locally and relative
to the offset 0 of the compiled script.
-mq11.4 Codegen uses GTA III half-float format.
-mtyped-text-label Codegen uses GTA SA text label data type.
-moptimize-andor Omits compiling ANDOR on single condition statements.
-moptimize-zero Compiles 0.0 as 0, using a 8 bit data type.
-moatc Uses the Custom Commands Header whenever possible.

Error Message Options:


--error-format=<format> The error formating for the compiler errors.
May be `default` or `json`. Do note the JSON format
may contain some pre-compilation messages in the
default format (i.e. gta3sc: type:? message).
-Werror Turns warnings into errors.
-Wconflict-text-label-var Warns when text labels conflicts with variable
names.
-Wexpect-var Warns if any of the variables specified with
the --expect-var option is out of place.
-fconstant-checks Checks whether variables collides with constants.

You might also like