> For the complete documentation index, see [llms.txt](https://nodemods.gitbook.io/nodemods-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nodemods.gitbook.io/nodemods-docs/event-guard/troubleshooting.md).

# Troubleshooting Guide

## Potential Issues

### False Positive Bans

**Symptom**: Players getting banned without apparent cheating

**Possible Causes**:

* High server load causing lag
* Salt difference thresholds too low

**Solutions**:

1. Increase `maxDifference` values in salt configuration
2. Adjust event cooldowns for frequently triggered events
3. Check server performance and reduce load

### Event Logger Not Showing

**Symptom**: Command doesn't open the event logger UI

**Possible Causes**:

* Permission function returning false
* UI resource not loaded
* Command conflicts

**Solutions**:

1. Check `checkPermission` function implementation
2. Ensure resource is started correctly
3. Verify command name isn't used by other resources

### Resource Compatibility Issues

**Symptom**: Certain resources not working with Event Guard

**Solutions**:

1. Add resource events to `eventIgnore` list
2. Add specific events to `eventNameEncryptIgnore`
3. Check resource load order in server.cfg

### Missing Webhook Logs

**Symptom**: Actions not being logged to Discord

**Solutions**:

1. Verify webhook URLs in `server-config.lua`
2. Check Discord channel permissions
3. Ensure webhook URLs are properly formatted

## Performance Optimization

### High-Traffic Servers

For servers with many players or frequent events:

1. **Adjust Salt Settings**:

```lua
Events_cfg.Salt = {
    maxDifference = {
        global = {
            log = 5,  -- Increased threshold
            ban = 7   
        },
        event = {
            log = 3,
            ban = 4
        }
    }
}
```

2. **Optimize Event Logging**:

* Add high-frequency events to `dontLogEvents`
* Increase cooldown periods for common events

### Resource-Heavy Servers

1. **Event Filtering**:

* Carefully whitelist essential events
* Exclude system events that don't need protection

2. **Webhook Management**:

* Use separate webhooks for different log types
* Implement rate limiting for webhook calls


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://nodemods.gitbook.io/nodemods-docs/event-guard/troubleshooting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
