← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

ArduPilot found no place to load scripts from, or no scripts

WarningBoard, internal errors, CAN, scripting

What ArduPilot says:

With SCR_ENABLE 1, ArduPilot loads every file whose name ends in “.lua” from two places at start-up: the folder APM/scripts on the microSD card, and the scripts built into the firmware itself. SCR_DIR_DISABLE can switch either off (bit 0 the built-in ones, bit 1 the card folder). The lines say the card folder could not be created or opened, that both places are switched off, or (only with SCR_DEBUG_OPTS bit 0) that no script is running.

What to do, most likely first

  1. There is no microSD card, or it cannot be written.

    CheckIs logging failing too?

    FixFit a working card; ArduPilot creates APM/scripts itself at the next start. On a board with no card slot, scripts have to be built into the firmware with the Firmware Builder.

  2. The scripts are in the wrong place or have the wrong name.

    CheckThey must be directly in APM/scripts, not in a sub-folder, with names ending in “.lua” and not starting with a dot.

    FixMove them and reboot.

  3. SCR_DIR_DISABLE switches off the place your scripts are in.

    FixSet SCR_DIR_DISABLE to 0 and reboot.

Parameters to look at

ParameterWhat it is
SCR_ENABLEEnable Scripting
SCR_DIR_DISABLEDirectory disable
SCR_DEBUG_OPTSScripting Debug Level
The code that sends it

Lua: open directory (…) failed

libraries/AP_Scripting/lua_scripts.cpp lua_scripts::load_all_scripts_in_dir() · Open in ArduPilot Copter-4.7.1

Lua: All directory's disabled see SCR_DIR_DISABLE

libraries/AP_Scripting/lua_scripts.cpp lua_scripts::run() · Open in ArduPilot Copter-4.6.3

libraries/AP_Scripting/lua_scripts.cpp lua_scripts::run_engine() · Open in ArduPilot Copter-4.7.1

Lua: No scripts to run

libraries/AP_Scripting/lua_scripts.cpp lua_scripts::run() · Open in ArduPilot Copter-4.6.3

libraries/AP_Scripting/lua_scripts.cpp lua_scripts::run_engine() · Open in ArduPilot Copter-4.7.1

Scripting: failed to create (…)

libraries/AP_Scripting/AP_Scripting.cpp AP_Scripting::init() · Open in ArduPilot Copter-4.7.1

Written here for Copter 4.6. In the tool you choose your vehicle and version, see your own parameter values beside the ones named here, and drop a flight log to have every message in it explained.

Open it in the Message & Error Explainer