# Change Script Engine Limitations

If HyperDbg displays an error message such as "**err, exceeding the max execution count**" indicating that the maximum number of script engine executions has been reached, you can resolve this issue by increasing the execution limit.

To fix this problem, you must build a customized version of HyperDbg that uses the most suitable number for your requirements.

Navigate to the source code and locate the following macro. In the header files, search for `MAX_EXECUTION_COUNT` and you will see the following code:

```clike
/**
 * @brief Maximum number of variables that can be used in the script engine
 */
#define MAX_EXECUTION_COUNT 1000000
```

The above macro defines the maximum number of operations that are possible to run in a single round of script execution. You must increase it according to your estimation.

If HyperDbg displays an error message such as "**err, stack buffer overflow**" indicating that the maximum number of stack variables has been pushed and the stack is full, you can resolve this issue by increasing the execution limit.

Navigate to the source code and locate the following macro. In the header files, search for `MAX_STACK_BUFFER_COUNT` and you will see the following code:

```c
/**
 * @brief Maximum number of stack buffer count in the script engine
 */
#define MAX_STACK_BUFFER_COUNT 256
```

The above macro defines the maximum variables that could be pushed into the stack. You must increase it according to your estimation.

After that, [rebuild](https://docs.hyperdbg.org/getting-started/build-and-install) HyperDbg, and use your custom-made version of the debugger.


---

# Agent Instructions: 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:

```
GET https://docs.hyperdbg.org/tips-and-tricks/misc/customize-build/change-script-engine-limitations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
