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

# Troubleshooting

> Common script failures and fixes.

## Script Does Not Load

Reload scripts:

```text theme={null}
;scripts reload
```

Failed scripts report the filename and a short error. Fix that file and reload again.

Common causes:

* file does not end in `.lua`
* missing comma in a table literal
* using a global or method that is not present
* calling `Time.sleep` inside a client-thread event callback

## Runtime Error Disables Script

Unhandled runtime errors disable only the script module that threw. The chat message has the short error and the log includes the callback location.

Wrap optional raw Java/reflection calls with `pcall`:

```lua theme={null}
local ok, result = pcall(function()
  return tostring(Java.mc())
end)

if ok then
  Chat.log(result)
else
  Chat.log("optional call failed: " .. tostring(result))
end
```

## Blocking Call Rejected

Blocking waits cannot run on the client thread or during packet callbacks.

```lua theme={null}
Script.thread(function()
  Time.sleep(1000)
  Chat.log("safe from a script worker thread")
end)
```
