DreamGUI
Diagnostics

DUI1xxx · Lexer

A character sequence that is not a token.

Generated by scripts/diagnostics/sync.py from the plugin's code table (EDreamUIDiagnosticCode); the name on each card is the one the tests assert.

DUI1001

errorcode nameUnexpectedCharacter

A character that cannot begin any token.

How it happens: the lexer meets a character no token of the grammar starts with: a single quote, $, ?, [, ], a backtick, or a lone & or | (only && and || are operators). A run of them is reported once, so a Source File aimed at something that is not a .dui at all gives you one message rather than thousands burying every other problem.

Text Title {
    Text = 'Settings'
}

How to fix: quote strings with double quotes; if the whole file is noise, check what the Blueprint's Source File points at.

DUI1002

errorcode nameUnterminatedString

A string that reaches the end of its line without its closing quote.

How it happens: a string cannot span lines, so a " with no unescaped " after it before the end of the line is this code. Usually the closing quote is missing, or a quote inside the string was not written \".

Text Title {
    Text = "Settings
}

How to fix: add the closing quote; write a quote inside a string as \" and a line break as \n.

DUI1003

errorcode nameUnterminatedComment

A /* that never reaches */.

How it happens: a block comment runs from /* to the first */; with none before the end of the file, the whole rest of the file is the comment.

/* Settings page
Widget Root {
    Text Title { Text = "Settings" }
}

How to fix: close the comment where it should end; // for a single line is harder to get wrong.

DUI1004

errorcode nameMalformedNumber

A number that cannot be read: two decimal points, a trailing dot, a unit glued on (24px).

How it happens: something starts like a number and carries what no number has: 1.2.3, 3., an exponent with no digits (1e), a minus with nothing after it, or letters stuck to it, such as the 24px a CSS habit writes. All of it is swallowed into one token before it is reported, so a leftover px is not read as a node header and reported a second time as something unrelated.

Text Title {
    FontSize = 24px
}

How to fix: write a plain number -- -12, 0.95, 1e-45; leave units out, the value is read in the property's own unit.

DUI1005

errorcode nameMalformedHexColor

A colour whose digit count is not 3, 4, 6 or 8.

How it happens: a colour is #RGB, #RGBA, #RRGGBB or #RRGGBBAA, read as sRGB. Any other count (a digit short, as in #FF660), or a character after # that is not a hex digit, is this code.

Text Note {
    Color = #FF660
}

How to fix: write the full count, #FF6600; for alpha, write eight digits, #FF6600CC.

DUI1006

errorcode nameIdentifierTooLong

A name longer than an FName holds.

How it happens: every name the language writes down -- a node id, a property, a handler, a loop variable -- ends up as an FName somewhere, and an FName handed an over-long string (more than the 1023 characters NAME_SIZE allows) does not return an error: it asserts and takes the editor with it. So the lexer stops it at the token, one rule for every position a word can appear in. The id the parser makes for an unnamed node raises the same code when it would be too long.

How to fix: shorten the name; for a made-up id, give the node, or a node above it, an id of its own.

DUI1007

errorcode nameAssetPathTooLong

An asset path longer than an FName holds.

How it happens: a load splits the path into names -- the package's, the object's -- and an FName that is too long stops the editor rather than fail (see DUI1006). A path written bare is caught by the lexer, one written as a string by the builder.

How to fix: check whether the path was assembled wrongly or pasted twice; no real asset path is this long.

On this page