Developer documentation
Error codes
A call that can't be done changes nothing. Its error message starts with one of these 29 codes and a colon, then says what was wrong and how to ask again.
no_documentNo document is open in SpriteGrid. Make one with
new_documentor open one withopen_document.document_not_foundNo open document matches the id, path or name given.
get_statuslists the open documents.layer_not_foundThe document has no layer with that id or name, or no layers at all.
describe_documentlists them.ambiguous_layerMore than one layer has that name. Name the layer by its id instead; the message lists them.
layer_not_paintableThe layer isn't an image layer (it's a group, text or 3D layer, say), so it can't be drawn on. Draw on an image layer (
add_layermakes one).layer_lockedThe layer is locked. Unlock it with
update_layer(locked: false), or draw on another layer.slice_not_foundThe document has no slice by that name.
describe_documentlists the slices.effect_not_foundNo effect matches: either SpriteGrid has no effect of that kind (
list_effectslists them), or the layer has no effect with that id (describe_documentlists each layer's).no_animationThe document isn't an animation, and the call needs one. Make it one with
set_animation.frame_heldThat frame shows an earlier frame's drawing (it has none of its own), so drawing on it wouldn't stick. Give it its own with
set_cel, or draw on the frame whose drawing it shows.tile_not_foundThe atlas has no such tile, or no tiles yet.
describe_atlaslists them;add_tilemakes one.out_of_boundsA position, area, frame or index is outside what the document has. The message says what the limits are.
too_largeThe request is bigger than one call can take: too many pixels, cells or frames, or too big an image. Split it up, or ask for a smaller scale.
invalid_argumentA value can't be used as given: a malformed color, a grid whose rows don't match, an unknown option, and so on. The message says which and why.
revision_mismatchThe document changed since the expectedRevision given (the user edited it, say), so nothing was done. Look at it again, then retry.
user_busyThe user is drawing in SpriteGrid right now, and changes wait for them. Try again in a moment.
document_generatingSomething is being generated for the document with Retro Diffusion, and it's locked until that finishes (usually under a minute). Try again then, or work in another document.
document_in_useAnother assistant is working on the document, so it's locked to everyone else until they release it or go quiet for 20 seconds. Work in another document, or wait;
get_statussays who's working on which.document_taken_overThe user took the document over from this assistant, which can still look at it but not change it again. Work in another document, or ask the user.
dialog_openSpriteGrid is showing a dialog, and the change waits until the user closes it. Try again in a moment.
file_existsA file is already at that path. Pass overwrite: true to replace it, or pick another path.
file_not_foundThere's no file at that path. Paths are full paths; a leading ~ is the home folder.
unsaved_changesClosing or replacing the document would lose unsaved changes. Save it first (
save_document), or pass discardChanges: true.nothing_to_undoThere's nothing to undo (or redo).
not_the_assistants_stepThe step to undo or join isn't this assistant's own: it's the user's or another assistant's. Pass includeUserSteps: true to undo the user's step anyway; only an assistant's own newest steps can be joined.
render_failedSpriteGrid couldn't render the image just then. Try again.
not_connectedSpriteGrid isn't connected to a Retro Diffusion account, or the account's key was refused. The user connects in Generate ▸ Account.
not_enough_creditThe Retro Diffusion account doesn't have enough credit for the generation. The user can add funds in Generate ▸ Account.
failedSomething went wrong that the other codes don't cover, or SpriteGrid didn't answer in time. Nothing should have changed; check with
describe_document.