Skip to content
BlockFrontBlockFront DocsOfficial Documentation for BlockFront

Debugging

The game watches your pack folder. When you save a file, the mission reloads and the current section restarts.

To reload by hand:

/bf admin campaign reload

A script error shows on screen with the file, the line and a traceback. An error on a section’s main thread stops the mission, so fix it and save to reload.

/bf admin campaign sections
/bf admin campaign jumpto <section>

/mission debug draws your triggers, markers, routes and actors in the world. It also shows a panel with the current section, running threads and what each one is waiting for, flags and recent events.

You can also place your own labelled shapes from a script with draw.

Command What it does
/mission state Prints the same information as the panel, ready to copy
/mission locate Copies a one-line summary of where the mission is
/mission pos Copies your position, ready to paste into a script
/mission region Copies the region you’ve selected with the wand
/mission dump Writes the level table, objectives and live actors to the log and chat, for working out why a mission is stuck
Problem Likely cause
mission.api(1) must be declared The call is missing from the top of mission.lua.
mission.lua registered no sections No mission.section ran, often after a typo at the top level.
A wait at the top level fails Waiting only works inside a section or a thread.
A thread is stopped for running too long A loop has no wait in it.
The /mission commands aren’t available The pack is a zip. Editing needs a folder.
Your campaign isn’t listed The pack isn’t enabled in the resource pack screen.