Fixed a number of spelling and grammatical errors. Should be set now. Added better examples and removed redundant words.

develop
Gabe Rau 2021-03-20 15:49:53 -06:00
parent 374fc763eb
commit cc376eeb55
1 changed files with 8 additions and 15 deletions

@ -4415,24 +4415,17 @@ General script API
command-line. The ``name`` argument should be the name of the script without
its extension, as would be used on the command line.
Example::
dfhack.run_script("armoks-blessing", "all")
Scipts that use a dash(``-``) in their arguments still require one when called
from ``dfhack.run_script``.
Example::
dfhack.run_script("gaydar", "-all")
Example:
Unlike ``dfhack.run_command``, ``dfhack.run_script`` allows a different
different script to be executed and its value passed as an argument to the main
function called by ``dfhack.run_script``.
In DFHack prompt::
Example::
dfhack.run_script("some_script", dfhack.gui.getDwarfmodeViewDims());
repeat -time 14 -timeUnits days -command [ workorder ShearCreature ] -name autoShearCreature
While this implmenation is currently a functional, its purpose and stability
are limited. As such, ``dfhack.reqscript(name)`` should be used.
In lua script::
Note that the ``dfhack.run_script()`` function allows Lua errors propagate to the caller.
dfhack.run_script("repeat", "-time", "14", "-timeUnits", "days", "-command", "[", "workorder", "ShearCreature", "]", "-name", "autoShearCreature")
Note that the ``dfhack.run_script()`` function allows Lua errors to propagate to the caller.
To run other types of commands (such as built-in commands, plugin commands, or
Ruby scripts), see ``dfhack.run_command()``. Note that this is slightly slower