> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fascripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Resolve FA Minigames startup, NUI, export, and integration problems.

Start with the first relevant server or client console error. Confirm the resource order before changing game code.

<AccordionGroup>
  <Accordion title="An export does not exist" icon="code">
    Confirm the folder is named `fa_minigames` and that `ensure fa_minigames` runs before the resource calling it. Use the exact export casing, for example `exports.fa_minigames:Skillbar()`.
  </Accordion>

  <Accordion title="The minigame does not open" icon="gamepad">
    Confirm the release includes `web/dist/index.html` and its built assets. Check the client console for NUI errors, then verify that another resource has not already opened an FA Minigames session.
  </Accordion>

  <Accordion title="The result is busy" icon="hourglass-half">
    FA Minigames supports one active session at a time. Wait for the current export to return, or call `exports.fa_minigames:Cancel()` before starting a replacement flow.
  </Accordion>

  <Accordion title="The game closes immediately" icon="clock">
    Review `timeout`. It is measured in milliseconds and cannot be shorter than 5000. For Terminal, set the outer timeout slightly longer than `timeLimit`.
  </Accordion>

  <Accordion title="A keypad code is exposed or accepted insecurely" icon="shield-halved">
    Do not place a correct code in client code or send it to NUI. Use `validate` to call your owning server and let that server decide whether to allow the gameplay action.
  </Accordion>

  <Accordion title="A player receives a reward after a client success" icon="triangle-exclamation">
    A result from this resource is not authority to grant anything. Validate the player, distance, state, item capacity, rate limit, and reward on your server before completing the action.
  </Accordion>
</AccordionGroup>

## What to include in a support request

* FA Minigames version
* Exact FiveM artifact and game build
* Resource start order
* The export call and options table
* Complete first relevant server and client console error
* Steps that reproduce the issue

Remove license keys, webhook URLs, API keys, and other secrets before sharing logs in [FA Scripts Discord](https://discord.gg/ePYv5V5b8w).
