> For the complete documentation index, see [llms.txt](https://rtx-dev.gitbook.io/rtxdev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rtx-dev.gitbook.io/rtxdev/rtx-realistic-gym-system/common-issues.md).

# Common Issues

{% hint style="success" %}
**Read the server console first.** Almost everything on this page prints a line at startup saying exactly what is wrong. The gym is deliberately loud about the mistakes that are otherwise silent.
{% endhint %}

<details>

<summary>A gym from the config is not there</summary>

The map it is built in is not installed. Every gym in `configs/defaultgyms.lua` can name the resource its map comes in:

```lua
requires = {"dc_fitness"},
```

If that resource is not on the server the gym is never created, and the console says so:

```
[RTX GYM SYSTEM] - 2 gym(s) in the config were skipped, the map they are built in is not installed:
[RTX GYM SYSTEM] -   dcfitness needs dc_fitness
```

Install the map, or delete that gym from the file. Nothing else is affected.

Five of the gyms that ship with the resource have a placeholder on that line — they are there as examples and they will not load until you put a real resource name in.

</details>

<details>

<summary>Target is on and nothing can be used</summary>

Three things to check, in this order.

1. **Is the target resource actually running?** Installed is not enough. The gym prints this at startup:

   ```
   [RTX GYM] ox_target is installed but it is stopped, so it cannot answer anything.
   ```
2. **What did it register?** About ten seconds after start:

   ```
   [RTX GYM] Target is on (ox_target). 23 machine models and 20 gym points registered.
   ```

   Zero machine models means the models never registered — look for a line above it saying the target system refused a zone.
3. **Is `Config.Target.distance` big enough?** It is measured to the **middle** of the machine, not the part you are aiming at, and a cable stack is two metres long. Under three metres a machine simply never offers anything.

</details>

<details>

<summary>The creator says I am not allowed</summary>

The **server console** prints exactly which check refused you, and your own identifiers ready to paste:

```
[RTX GYM] Nina (id 1) was refused the gym creator.
[RTX GYM] Config.GymCreatorPermissions in config.lua says:
[RTX GYM]   ace check   ON   wants "gymcreator.use"   this player has it: false
[RTX GYM]     add this to your server.cfg and restart:
[RTX GYM]       add_ace group.admin gymcreator.use allow
[RTX GYM]       add_principal identifier.license:xxxx group.admin
```

</details>

<details>

<summary>The reception ped does not spawn</summary>

The model does not exist. A model that is not in the game spawns nothing and leaves no trace, which is why this looks like a bug in the ped code.

The gym checks every ped model it ships with at startup and prints any that the game does not have. Pick one from the list in `configs/gyms.lua` — the creator shows them in a dropdown, so there is nothing to type.

</details>

<details>

<summary>Items do nothing when used</summary>

Almost always ox\_inventory without the export line. ox\_inventory has no `RegisterUsableItem`, so each item has to point at the gym's own export:

```lua
server = {export = "rtx_realistic_gym.UseGymItem"},
```

Copy `[Items]/OX-ITEMS.lua` as it is rather than typing the items out.

If you renamed the resource folder, that line has to change with it.

</details>

<details>

<summary>Everybody gains xp far too fast</summary>

Two settings that exist for filming and get left in.

**`Config.ExerciseSettings.repsmultiplier`** in `configs/exercises.lua` shortens every set. It ships at `1.0`.

**`every` and `mindistance`** in `Config.Activities`, `configs/stats.lua`. They ship at 10 seconds and 14 / 8 / 4 metres. Turned down, running across the city pays about three times what it should.

The server prints a warning at every start while either of them is off its shipped value.

</details>

<details>

<summary>A player got on a machine and no card ever opened</summary>

Rare, and it heals itself. The machine gets stuck part way on, and after a few seconds two watchdogs — one on each side — put it back and let the player go, with a line in the console saying which machine and how long it waited.

If you see it often, `Config.ExerciseSettings.stuckafterms` is how long the client waits before it steps in.

</details>

<details>

<summary>A machine is standing where a gym used to be</summary>

Machines the world scanner found are forgotten again after `Config.MachineCleanupAfter` seconds without anybody seeing them. Machines placed as part of a gym are never forgotten — delete them in the creator.

</details>

<details>

<summary>I edited a config and nothing changed</summary>

Check you edited the file that is read. Since the gyms moved out of `config.lua`, the two most common mix-ups are:

* the gyms are in **`configs/defaultgyms.lua`**, not `config.lua`
* the integration events are in **`configs/integration.lua`**, not `config.lua`

And if you are looking at a gym that already exists in the database, editing the config does not touch it — that is deliberate. See [Keeping your gyms in the config](broken://pages/4a0b2034cf13be9e34a40bb9b11f9462cafc6538).

</details>

<details>

<summary>SQL errors about a duplicate column at every restart</summary>

You should not see these. The gym asks the database which columns exist before it adds any, and only adds the ones that are missing. If you do see them, something else is running the same `ALTER`.

</details>
