Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/advanced/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,20 @@ Deleting a variable is done with the `variableControllerDelete`.
```js
await takaro.variable.variableControllerDelete(variableId);
```

If a module created multiple variables, search for the variables first and delete each record by ID. For module cleanup, include the `moduleId` and `gameServerId` filters so you only delete data for the module on the intended game server.

```js
const variables = await takaro.variable.variableControllerSearch({
filters: {
gameServerId: [gameServerId],
moduleId: [mod.moduleId],
},
});

for (const variable of variables.data.data) {
await takaro.variable.variableControllerDelete(variable.id);
}
```

Uninstalling a module from a game server does not delete variables created by that module. Delete variables separately when you want to remove saved module data.
2 changes: 2 additions & 0 deletions docs/modules/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Useful fields often include errors, arguments, player data, game server IDs, mod

If the issue involves saved module data, also check the variables created by the module. For example, the teleport module stores player teleport locations as variables linked to the player, game server, and module.

If you need to remove saved module data, delete the relevant variables. See [Deleting variables](/advanced/variables#deleting-a-variable) for the API pattern.

## Share event JSON when asking for help

If you ask us for help with a module issue, include the event JSON. It gives us the exact data Takaro saw when the module ran and helps us debug the problem faster.
Expand Down
6 changes: 4 additions & 2 deletions docs/modules/install-configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ Tagged module versions are immutable. The `latest` version is useful while devel

## Remove a module

Uninstalling a module stops its commands, hooks, and cronjobs from running on that game server. It doesn't automatically clean up all data that the module may have stored.
Uninstalling a module removes the module installation and configuration for that game server. The module's commands, hooks, and cronjobs stop running on that server.

Before removing a module that stores variables, check whether you need to export, migrate, or manually delete that data.
Uninstalling a module does not delete variables created by that module. Variables are scoped to the module and game server, but they remain after the module installation is removed.

Before uninstalling a module that stores variables, check whether you need to export, migrate, or manually delete that data. See [Deleting variables](/advanced/variables#deleting-a-variable) for the API pattern.

## Troubleshooting

Expand Down
Loading