# sm.container.swap

Swaps two item slots.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
sm.container.swap( container, container, slotFrom, slotTo )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.container.md#swap)

**Availability:** Server only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `container` | [Container](../Game-Script-Environment/Userdata/Container.md) | The first container. |
| `container` | [Container](../Game-Script-Environment/Userdata/Container.md) | The second container. |
| `slotFrom` | integer | The first slot |
| `slotTo` | integer | The second slot |

**Returns:**

| Type | Description |
| --- | --- |
| boolean | Indicates if the action is possible. |
