# void EnvWriteString(int, str, str)

[Family: Global](/imperivm/en/CKS/familias/global/)

## Exact signature

```text
void EnvWriteString(int, str, str)
```

## Description

Writes a string under a key in the specified player's environment. Arguments are, in order, the player number, the key, and the string to write.

## Usage notes

This overload scopes the key to the specified player. Scripts use it, for example, to record research states. Retention of this data across games and complete player-number validation are not documented.

## Parameters and return type

**Return type:** `void`

| Position | Type |
| --- | --- |
| 1 | `int` |
| 2 | `str` |
| 3 | `str` |

## Other overloads

Check the exact signature. A description of one overload does not automatically document the others.

- [`void EnvWriteString(str, str)`](/imperivm/en/CKS/reference/api-06925e35e33897/)
- [`void EnvWriteString(Settlement, str, str)`](/imperivm/en/CKS/reference/api-85691c6d928444/)
- [`void EnvWriteString(Building, str, str)`](/imperivm/en/CKS/reference/api-875e1e5c3fa301/)

## Read and share

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

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