A command is an action you can perform in PICO-8 by typing it at the command prompt. Commands are used to load and save cartridges, manage files, and launch the Splore cartridge explorer.
A command is an action you can perform in PICO-8 by typing it at the command prompt. Commands are used to load and save cartridges, manage files, and launch the Splore cartridge explorer.
Executing commands[]
Unlike functions, you do not use parentheses after the command name. For commands that take arguments, you type each argument after the command separated by spaces. String arguments such as filenames are not surrounded by quote marks.
<pre class="p8sh"> > load jelpi.p8 </pre>
Almost all commands can be called by source code as functions, but some do not work in code, such as most file operations. The ones that do work use parentheses around the argument list, quotes around string arguments, and commas between arguments. Most commands don't do anything useful when called from code.
<syntaxhighlight lang="lua"> -- load a new cart, overwriting this one load('jelpi.p8') -- List /carts/ directory and set it to a variable dir=ls("") </syntaxhighlight>
Help and information[]
- <code>help</code>
- <code>info</code>
- <code>install_demos</code>
- <code>splore</code>
Files and folders[]
- <code>backup</code>
- <code>cd <nowiki>[dirpath]</nowiki></code>
- <code>dir</code>
- <code>export filename</code>
- <code>folder</code>
- <code>import filename</code>
- <code>load filename</code>
- <code>ls</code>
- <code>mkdir dirname</code>
- <code>save <nowiki>[filename]</nowiki></code>
Running and quitting[]
- <code>reboot</code>
- <code>reset</code> (undocumented)
- <code>resume</code>
- <code>run</code>
- <code>shutdown</code>
Configuration[]
See also[]
Help and information[]
Files and folders[]
backup
cd [dirpath]
dir
export filename
folder
import filename
load filename
ls
mkdir dirname
save [filename]