> 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/high-value-warnings.md).

# High-value warnings

### `GPC3004` — unreachable code

Remove code after unconditional `return`/flow termination or correct the branch.

***

### `GPC3005` / `GPC3006` — removed function/combo

The item is unreachable. Confirm this is intentional rather than a missing call.

***

### `GPC3009` — parameter shadows global

Rename the parameter. Inside the function, the parameter wins.

***

### `GPC3012..GPC3017` — const array fits narrower type

Use the suggested narrower signed/unsigned width when it preserves intended values.

***

### `GPC6014` — assignment in condition

```cpp
if(mode = 2) { }  // assignment
if(mode == 2) { } // comparison
```

***

### `GPC6015` / `GPC6016` — division/modulus becomes zero

Review integer truncation and operand order.

***

### `GPC6017` — shift out of range

Live bit positions are `0..31`.

***

### `GPC6018` — switch fallthrough

Add `break` or clearly document intentional fallthrough.

***

### `GPC6019..GPC6023` — unused/dead data

Remove genuinely unused runtime state, const data, or arguments. Unused const data still costs bytes.

***

### `GPC6030` — index call evaluated twice

Store a function result before indexing:

{% code title="store-index-before-use.gpc" lineNumbers="true" %}

```cpp
const int8 TABLE[] = { 10, 20, 30 };

int index;
int value;

main {
    index = choose_index();
    if(index >= 0 && index < sizeof(TABLE)) {
        value = TABLE[index];
    }
}

function choose_index() {
    return 0;
}
```

{% endcode %}

***

### `GPC6035` — possible stack overflow

Split giant nested expressions into intermediate globals, shorten deep call chains, and remove recursion. Globals and peak call/expression stack share the 1,024-slot VM ceiling; do not treat the 1,020 variable limit and 1,024 stack limit as independent pools.

***

### `GPC6036` — recursion

The compiler cannot prove worst-case stack depth. Prefer an iterative state machine.

***

### `GPC9002` — old sensitivity arguments

Use `sensitivity(identifier, midpoint, sensitivity)` only.


---

# 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/high-value-warnings.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.
