> For the complete documentation index, see [llms.txt](https://guide.cronuszen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.cronuszen.com/gpcscripting/gpc-script-guide/troubleshooting/compiler-diagnostic-catalog/lexer-errors-gpc11xx.md).

# Lexer errors (GPC11xx)

### GPC1100 — Unterminated Block Comment

```
Unterminated block comment.
```

**Severity:** Error

A `/*` block comment is never closed with `*/` before the end of the file. Everything after the `/*` was consumed as comment text. Check for a missing `*/`.

Watch out for the nesting trap: block comments do not nest. In `/* outer /* inner */ text */` the comment ends at the **first** `*/`, so `text */` is suddenly parsed as code — which typically produces confusing, unrelated-looking errors (undefined identifiers and the like) rather than GPC1100 itself. GPC1100 only appears when the file ends while still inside a comment. If you need to comment out code that already contains a block comment, use `//` line comments for that region instead.

***

### GPC1102 — Unterminated String (End of File)

```
Unterminated string detected. The leading '"' character will be ignored: {text}
```

Or:

```
Unterminated string: {text}
```

**Severity:** Error

Error-severity variant of GPC1006: the file ended inside a string literal. Add the missing closing `"`.

***

### GPC1103 — Unterminated String (Newline)

```
Unterminated string detected. The leading '"' character will be ignored: {text}
```

Or:

```
Unterminated string: {text}
```

**Severity:** Error

Error-severity variant of GPC1007: a line break occurred inside a string literal. GPC strings must open and close on the same line.

***

### GPC1104 — Invalid Hex Escape Sequence

```
Invalid escape sequence. Expected '\x' followed by 2 hex digits (00 to ff or FF). For example '\x5E' for '^'
```

**Severity:** Error

A `\x` escape inside a string literal is not followed by exactly two hexadecimal digits. Write `\x0A`, not `\xA`.

```c
const string bad = "\xZ1";   // GPC1104 — Z is not a hex digit
const string ok  = "\x5E";   // '^'
```

***

### GPC1105 — Unrecognized Escape Sequence

```
Invalid escape sequence: '\{char}'.
```

**Severity:** Error

A backslash inside a string literal is followed by a character that is not a recognized escape. The backslash is kept literally and scanning continues. If you want a literal backslash, write `\\`.

***

### GPC1106 — Trailing Backslash in String

```
Invalid escape sequence: '\'.
```

**Severity:** Error

A string literal ends with a lone `\` — the backslash starts an escape sequence but nothing follows it before the string terminates.

***

### GPC1107 — Hex Number Out of Range (16-bit)

```
Failed parsing '{value}' as a int. It's probably out of range: 0x0000 - 0xFFFF.
```

**Severity:** Error

A hexadecimal literal (`0x...`) in a 16-bit script is larger than `0xFFFF`. In 16-bit mode every number is stored in 16 bits, and a hex literal may use the full unsigned range `0x0000`–`0xFFFF` — values above `0x7FFF` are accepted and wrap to negative when read as a signed number, which is exactly what you want for bit masks. A value that needs more than four hex digits simply cannot be stored. Use a value within `0xFFFF`, or switch the script to 32-bit mode if you genuinely need larger constants.

***

### GPC1108 — Binary Number Out of Range (16-bit)

```
Failed parsing '{value}' as a int. It's probably out of range.
```

**Severity:** Error

A binary literal (`0b...`) in a 16-bit script does not fit in 16 bits. In 16-bit mode every number is stored in 16 bits, and a binary literal may use the full unsigned range — at most 16 significant bits (`0b1111111111111111` = 65535); values with the top bit set are accepted and wrap to negative when read as a signed number. A literal whose value needs more than 16 bits cannot be stored. Shorten the literal to at most 16 significant bits, or switch the script to 32-bit mode if you genuinely need larger constants.

***

### GPC1109 — Decimal Number Out of Range (16-bit)

```
Failed parsing '{value}' as a int. It's probably out of range: 0 - 32767.
```

**Severity:** Error

A decimal integer literal in a 16-bit script is larger than 32767. In 16-bit mode numbers are signed 16-bit values, and a decimal literal itself must be in `0`–`32767` — negative constants are formed by applying unary minus to a positive literal, so the literal part must fit that range on its own. If you meant a bit pattern rather than a quantity (e.g. 65535 as "all bits set"), write it in hexadecimal instead — hex literals accept the full unsigned range `0x0000`–`0xFFFF`. If you genuinely need a larger quantity, switch the script to 32-bit mode.

***

### GPC1110 — Float Number Out of Range (16-bit)

```
Failed parsing '{value}' as a int. It's probably out of range.
```

**Severity:** Error

A numeric literal in a 16-bit script could not be parsed as a number at all. In practice this fires for scientific notation with a missing exponent — `1.0e+`, `2.5e`, or `3.0E` — where the `e`/`E` announces an exponent but no digits follow it. Complete the exponent (`1.0e+3`) or write the value out as a plain literal. Remember that GPC has no floating-point type: a valid decimal-point literal is rounded to the nearest integer anyway.

***

### GPC1111 — Hex Number Out of Range (32-bit)

```
Failed parsing '{value}' as a int. It's probably out of range: 0x00000000 - 0xFFFFFFFF.
```

**Severity:** Error

A hexadecimal literal (`0x...`) in a 32-bit script is larger than `0xFFFFFFFF`. Numbers are stored in 32 bits, and a hex literal may use the full unsigned range `0x00000000`–`0xFFFFFFFF` — values above `0x7FFFFFFF` are accepted and wrap to negative when read as a signed number, which is exactly what you want for bit masks. GPC has no larger integer type, so a value that needs more than eight hex digits cannot be represented at all — the constant must be reworked (e.g. split into parts).

***

### GPC1112 — Binary Number Out of Range (32-bit)

```
Failed parsing '{value}' as a int. It's probably out of range.
```

**Severity:** Error

A binary literal (`0b...`) in a 32-bit script does not fit in 32 bits. Numbers are stored in 32 bits, and a binary literal may use the full unsigned range — at most 32 significant bits; values with the top bit set are accepted and wrap to negative when read as a signed number. GPC has no larger integer type, so a literal whose value needs more than 32 bits cannot be represented at all — shorten it or rework the constant.

***

### GPC1113 — Decimal Number Out of Range (32-bit)

```
Failed parsing '{value}' as a int. It's probably out of range: 0 - 2147483647.
```

**Severity:** Error

A decimal integer literal in a 32-bit script is larger than 2147483647. Numbers are signed 32-bit values, and a decimal literal itself must be in `0`–`2147483647` — negative constants are formed by applying unary minus to a positive literal, so the literal part must fit that range on its own. If you meant a bit pattern rather than a quantity (e.g. 4294967295 as "all bits set"), write it in hexadecimal instead — hex literals accept the full unsigned range up to `0xFFFFFFFF`. GPC has no larger integer type, so a genuinely larger quantity cannot be represented.

***

### GPC1114 — Float Number Out of Range (32-bit)

```
Failed parsing '{value}' as a int. It's probably out of range.
```

**Severity:** Error

A numeric literal in a 32-bit script could not be parsed as a number at all. In practice this fires for scientific notation with a missing exponent — `1.0e+`, `2.5e`, or `3.0E` — where the `e`/`E` announces an exponent but no digits follow it. Complete the exponent (`1.0e+3`) or write the value out as a plain literal. Remember that GPC has no floating-point type: a valid decimal-point literal is rounded to the nearest integer anyway.

***

## GPC1115 — String Character Out of Range

```
Failed parsing '{value}' as a int. It's probably out of range.
```

**Severity:** Error

A character inside a string literal is outside the range the target can store.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://guide.cronuszen.com/gpcscripting/gpc-script-guide/troubleshooting/compiler-diagnostic-catalog/lexer-errors-gpc11xx.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
