DFHack/dfhack — pull request #443 by AndreasPK (2014-12-12 01:51:03+00:00)
Title: full-heal Script: Fixed error with passing nil to unit.find

full-heal only worked when passed unit id in command line. I fixed it so that it works again when selecting a unit in the GUI.

The Error was that args.unit contained nil without a id as parameter, so while the or shortcut would have worked unit.find didn't return nil but aborted instead.

Checking for a nil value beforehand fixes this so I added the check!