> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-staff-chat/troubleshooting.md).

# Troubleshooting

Fix common CAS Staff Chat problems: no access, messages not sending, empty names or avatars, missing alerts and cas\_fwlibs errors.

**"You don't have enough permission for access staff chat."** Your Steam hex is not in `CAS.Admins`, or it isn't written in lower case. Check that Steam is running, copy your identifier exactly (for example `steam:110000100000000`) and restart the resource.

**The window opens but messages don't send.** The resource folder must be called `cas-staffchat`, because the chat window sends to that name. Rename the folder and update `server.cfg`.

**Names or avatars are empty.** The Discord profile could not be read. Check `DiscordBotToken` in `server_config.lua`, and that the admin had Discord running when they joined. Or set `UseDiscordAvatar` and `UseDiscordName` to `false` to use Steam (see [Discord Profiles](/script-documentation/cas-staff-chat/discord-profiles.md)).

**No sound or badge for new messages.** Alerts are off when you join. Run `/togglebox` to turn them on.

**"You don't have enough permission for clear chat."** Only admins with `canClearChatHistory = true` can clear the history.

**Old messages come back after a restart.** The history is saved to `messageData.json` with every message. After `/clearchat`, the empty history is written with the next message, or when the resource stops normally.

**`[CAS ERROR] could not fetch cas_fwlibs export` in the console.** Install [`cas_fwlibs`](https://github.com/codeaftersex/cas_fwlibs) and start it before `cas-staffchat`.
