SCREEPS DIAGNOSTIC CENTER

Start with the symptom, not the constant

This is not another error-code dictionary. Start from the behavior you can observe, capture the real return value and runtime state, then continue into APIs, object hubs, focused guides, local tools, and accepted runtime verification.

Recommended workflow

Choose the closest symptom, run the quick triage, and record the real result before following a specific return-code branch.

SYMPTOM-FIRST DIAGNOSTICS

Start from what you see in the room

You do not need to know the error constant first. Pick the visible symptom, run the quick triage, then continue into the most relevant return codes, APIs, guides, tools, and accepted runtime verification.

10 symptom paths
SYMPTOM

Creep not moving

When a Creep appears stuck, first separate command rejection, path failure, fatigue, and target/range logic instead of repeatedly calling moveTo().

Quick triage

  1. Store the real result from moveTo() or the original action instead of judging only by position.
  2. Inspect creep.fatigue and confirm the target object and destination room are still valid.
  3. For ERR_NO_PATH, inspect terrain, exits, CostMatrix data, and callback constraints.
  4. Check position and the next result on a later tick to distinguish a persistent fault from a one-tick state.

Most likely return-code branches

More possible return codes
SYMPTOM

Creep not harvesting

When harvest() has no visible effect, confirm the return code, target type, range, WORK parts, and available resource before rewriting role logic.

Quick triage

  1. Store creep.harvest(target) and confirm target is not a stale cached object.
  2. Verify that the target is harvestable by this API and still contains the relevant resource.
  3. Check for usable WORK parts and the action's range requirement.
  4. After OK, inspect Store, Source, or Mineral state on a later tick for the actual effect.

Most likely return-code branches

SYMPTOM

Spawn will not spawn

When the Spawn queue produces nothing, separate busy state, Energy, body/name arguments, and RCL limits instead of blaming the queue generically.

Quick triage

  1. Store both dryRun and real spawn.spawnCreep() results.
  2. Inspect spawn.spawning, room Energy availability, body cost, and body length.
  3. Confirm the Creep name is unique and Memory/opts arguments are valid.
  4. For structure or capability limits, confirm the current Controller RCL satisfies the requirement.

Most likely return-code branches

More possible return codes
SYMPTOM

Controller downgrade pressure

Controller pressure is rarely one API problem; inspect ticksToDowngrade, Upgrader Energy, range, hauling, and the real upgrade return code as one chain.

Quick triage

  1. Read controller.ticksToDowngrade first and confirm the pressure is real.
  2. Store creep.upgradeController(controller) and inspect the Upgrader's Energy.
  3. Inspect range plus the upstream Container/Link/hauling flow that keeps the Upgrader supplied.
  4. Across multiple ticks, verify upgrade progress, Energy flow, and ticksToDowngrade are moving in the safe direction.

Most likely return-code branches

SYMPTOM

Market action failed

When Market deal/createOrder fails, inspect order arguments, Credits, resources, Terminal state, and transaction Energy cost rather than price alone.

Quick triage

  1. Store the real result and key arguments from Game.market.deal() or createOrder().
  2. Confirm the order is still valid and amount, room name, and resource type are correct.
  3. Check Credits, Terminal stock, and transaction Energy cost together.
  4. Retry only after the failing condition changes, then confirm whether the new result enters a different branch.

Most likely return-code branches

SYMPTOM

CPU usage too high

High CPU usually has no single return code. Measure hotspots, bucket, and tick load first, then decide whether to reduce scans, cache work, or spread work across ticks.

Quick triage

  1. Measure important code sections with Game.cpu.getUsed() before and after them instead of relying only on total tick usage.
  2. Record bucket plus the workload size of rooms, roles, or managers at the same time.
  3. Prioritize full-tick scans, repeated pathfinding, repeated sorting, and cacheable calculations.
  4. After changes, compare CPU and bucket across multiple ticks rather than concluding from one sample.

Most likely return-code branches

No single return code defines this symptom; measure the runtime state directly.

SYMPTOM

Resources not moving

When logistics stalls, identify whether withdraw, carrying, movement, transfer, or destination capacity is the broken stage and store each result separately.

Quick triage

  1. Store withdraw/pickup, moveTo, and transfer results separately instead of reducing the whole chain to one role state.
  2. Inspect source Store, Creep used/free capacity, and destination free capacity.
  3. Check pathing, fatigue, range, and whether the target object is still valid.
  4. Across multiple ticks, compare source, Creep, and destination Stores to verify the real resource flow.

Most likely return-code branches

More possible return codes
SYMPTOM

Builder not building or repairing

When build() or repair() has no visible effect, inspect the real return code, target type, range, WORK parts, Creep Energy, and target state first.

Quick triage

  1. Store the real result from creep.build(target) or creep.repair(target).
  2. Confirm build still targets a valid Construction Site and repair still targets a repairable structure.
  3. Check usable WORK parts, carried Energy, and action range.
  4. After OK, verify Construction Site progress or structure hits on a later tick to confirm the actual state change.

Most likely return-code branches

More possible return codes
SYMPTOM

Tower not attacking, healing, or repairing

When a Tower does not produce the expected action, confirm target, Energy, ownership, and the real action result before judging range falloff or combined Tower output.

Quick triage

  1. Store the real result from tower.attack(), tower.heal(), or tower.repair().
  2. Inspect Tower Energy, target type, and whether the target still exists instead of relying on visual appearance alone.
  3. When comparing output, include range falloff and combined output from multiple Towers.
  4. After OK, use target hits, the event log, or later-tick state to confirm the action actually took effect.

Most likely return-code branches

More possible return codes