Troubleshooting
First identify whether compilation failed, execution stopped with an error, or an API request was rejected. Each points to a different kind of problem.
Code does not compile
Go to the line and column in the diagnostic. Check semicolons, closing braces, types and spelling. Declare exactly one Program : ArcaneProgram.
Diagnostics for locked features show the required milestone. Check the unlock table. You can still save your draft. If you added a Can check to an early script, check whether Theory is unlocked.
Nothing happens
Save, Compile and Run are separate actions. Make sure you selected Run after compilation succeeded. You also need to resume explicitly after rejoining.
Code in OnStart alone does not run through OnRestored after rejoining. Use OnTick for repeated checks. A charging golem has IsIdle set to false.
Read request results
| Code | What to check |
|---|---|
| Locked | Content or purchase-slot requirements |
| InvalidId | The selected target or reference |
| InvalidAmount | Use a finite, positive quantity |
| InsufficientResource | Available, unreserved materials |
| InsufficientRp | Process materials to earn research points |
| CapacityFull | Storage capacity and reserved output |
| Busy | The golem or station is occupied. Check on a later tick |
| ScriptStopped | The autonomous spell's execution state |
| StaleEpoch | Retrieve a fresh reference after prestige or other invalidation |
| RateLimited | Keep change requests within 16 per event |
| PrestigePending | Wait for prestige processing |
| SaveNotReady | Wait for restoration to finish |
| SaveBlocked | Read the save error instead of repeatedly submitting requests |
| SafeStopped | Read the reason for the consistency safety stop |
| NumericLimit | Reduce a request that exceeds the supported numeric range |
ApiCode describes an API result. It is separate from compilation diagnostics and execution faults such as division by zero.
A job does not finish
For a Waiting job, inspect materials, Mana, batteries and output capacity. Accepted jobs continue online after the script stops. Cancel work you no longer need. Waiting ending does not guarantee success; check for Completed status.
Log messages are missing
Logs are personal and are neither saved nor synchronized. They allow up to 10 entries per second and keep the latest 64 entries, with up to 512 UTF-8 bytes per entry. Logging the same error on every tick can exceed the rate limit. Once you know the cause, keep logs only where needed.
Saving or resuming fails
A normal stop and a safety stop are different. A safety stop also freezes economic progress and saving. Read the restoration or save error rather than trying to clear it through normal resume.
Renaming, changing or deleting fields may prevent old state from carrying over. Replacing an autonomous spell shows a confirmation when state would be lost. Read it before deciding. A draft that fails compilation does not destroy the existing executable autonomous spell.
