StarOS: troubleshooting

Look at the robot page: last outcome, last error and events. In a script, robot.last is the outcome of the previous turn. See the overview.

Outcomes

outcome meaning what to do
moved the move happened nothing
idle no move, no failure nothing
blocked_terrain off the map, unwalkable ground, a building or a train probe with lidar, go around
blocked_robot a robot that did not move away holds the cell wait or go around
blocked_contest several robots wanted the cell and another won retry, or give one a yield rule
blocked_swap two robots tried to trade places make one wait
error a script error, including a compile error after parts changed read the error text
step_limit the script used all the steps of its base loop less, scan less, or use a bigger base
deadline the turn's deadline passed usually a slow AI call; lower timeout_s
no_power the robot could not pay its idle draw, so nothing counted battery cell, daylight or a station dock

After error, step_limit, deadline or no_power, memory is as it was before the turn.

The script ran, but something did not happen

These do not fail the turn; they are events on the robot.

event meaning
action_failed dig, unload, pickup, build and other part verbs: the reason says why. With outcome no_power the battery could not pay
payment_failed the payment would overdraw, or the name is wrong
market_failed the order was refused
contract_failed the contract call failed
relay_failed not your relay

Common script errors

  • Unknown name such as drill: the part is not attached.
  • drill.dig fails the script: no hopper, or no ore under the cell where the turn started.
  • A network call fails: the device is offline; switch it on from its page.
  • hopper.load() does not parse: use hopper.cargo().
  • A value you changed did not stick: call memory.set again.
  • Unload fails next to the depot: you are on a diagonal. Unload reaches side cells only.