# void Settlement::AIRun(str)

[Family: Settlement](/en/CKS/familias/settlement/)

## Exact signature

```text
void Settlement::AIRun(str)
```

## Description

Looks up the named AI script in the owning player's context and, if found, invokes it with the settlement as its context.

## Usage notes

The argument is the name used to resolve the AI script path. The reviewed path directly invokes execution with a temporary context representing the same settlement. A missing script produces a diagnostic. Use a valid settlement. Resumption of scripts that wait and their subsequent effects are outside this entry.

## Parameters and return type

**Return type:** `void`

The member is called on an object. Its receiver is not repeated among this signature’s arguments.

| Position | Type |
| --- | --- |
| 1 | `str` |

## Read and share

- [Markdown](/exports/en/cks/api-01a12d6e89b9d5.md)
- [JSON](/CKS/api/entries/api-01a12d6e89b9d5?lang=en)

Keep the notes and limitations when reusing this description. Do not infer undocumented parameter meanings, units or effects.
