Skip to content
Features

Diagnostics and quick fixes

The problems SCS IntelliSense finds while you type, and how to fix them in one click.

Problems are underlined as you type, before you ever start the game. They're also listed in the Problems panel (Control plus Shift plus M) for every open file.

Levels

LevelMeaning
Error (red)The game is expected to fail loading this.
Warning (yellow)Probably a mistake, or against SCS's documentation. The game loads it anyway.
Hint (dotted)Against SCS's documentation, but the game's own files do it too.

The levels are chosen from the game's own files: if the game ships a file that does something, it's never reported as an error.

To hide a level, open the Settings, search for Diagnostics: Enabled Severities and uncheck it. For example, uncheck warning and hint to see only errors.

What is checked

Structure (errors)

  • A missing :, { or }, or a } with nothing to close.
  • A missing or duplicated SiiNunit { } in a .sii file, or content after its closing brace.
  • An @include that doesn't start its line: the game ignores an indented one.
  • A quote that never closes (name: "Big Engine). The text is underlined to the end of its line, and the rest of the file is still read as written. Text that really spans several lines, as in the game's UI files, is fine.

Names

ProblemLevel
An invalid class name (ui:: with nothing after it, a name starting with a digit)Error
An invalid unit name: a part longer than 12 characters, a character other than letters, digits and _, an empty part (a..b), an unmatched quoteError
Two units with the same name in one file, nameless ones (.x) includedError
Uppercase letters in a unit nameHint

Attributes

These need the schema database, which knows every class of the game, its attributes and their types:

ProblemExampleLevel
An attribute the class doesn't haveprcie: 18000Warning
A value the attribute doesn't acceptpart_type: factroyWarning
Something other than a number where a number goesprice: abc, unlock: 1.5Warning
A negative number where only 0 or more is allowedunlock: -5Warning
A vector with the wrong count of numberscolor: (1.0, 0.5) for threeWarning
Something other than true or falseuse_perlin: yesWarning

The attribute lists come from the game itself, so an unknown attribute is almost always a typo. Numbers are accepted in every form the game's own files use: 1.5, +6, 2e-6, 25.0f, &3f800000, 0x10DE and nil; a bool can also be 0 or 1.

All of these checks also work inside a .sui fragment, using the class of the unit that includes it.

The end of the file (warning)

A file should end with a newline. Almost every file of the game does.

Quick fixes

When a problem has one obvious fix, a light bulb appears next to it. Click it, or put the cursor on the problem and press Control plus .:

ProblemFix
prcie: 18000Change to price
part_type: factroyChange to factory
price: "18000"Remove the quotes
truck my.truck {Add the missing :
price 18000 or price = 18000Change to price: 18000
my..truckChange to my.truck
"my.truckAdd the missing quote, or remove this one
name: "Big EngineClose the quote at the end of the line, or remove it
An indented @includeMove it to the start of its line
No newline at the endAdd it

Shift plus Alt plus . applies the fix right away when there's only one.

Some problems have no quick fix on purpose, because only you know the right answer: which of two duplicate units to rename, or where a missing } goes.

Not checked

The extension doesn't read the game's archives, so it can't tell whether a path or a pointer to one of the game's files is right. See Files of the game.