Bay 12 Games Forum

Dwarf Fortress => DF Modding => Utilities and 3rd Party Applications => Topic started by: Kraiger on October 27, 2015, 11:22:14 am

Title: Issues Running the 'Script' Command
Post by: Kraiger on October 27, 2015, 11:22:14 am
Hello, I can't seem to run any of the scripts using DF Hack. I keep getting
Code: [Select]
Error loading script . Any help would be appreciated.

Thanks.


*edit* I'm using the r4 version.
Title: Re: Issues Running the 'Script' Command
Post by: lethosor on October 27, 2015, 03:38:44 pm
What is "the r4 version"? What exact commands are you running?
Title: Re: Issues Running the 'Script' Command
Post by: Kraiger on October 31, 2015, 10:32:04 pm
It is the script I found from this http://www.bay12forums.com/smf/index.php?topic=127178.15 (http://www.bay12forums.com/smf/index.php?topic=127178.15) thread.

Code: [Select]
function heal2()
unit = dfhack.gui.getSelectedUnit()
unit.flags1.dead = false
if unit.caste == 0 then
unit.caste = 1
else
unit.caste = 0
end
end
heal2()

I saved it as a .lua and inserted it into the 'scripts' folder, but when I run the scripts command I get the error as seen from the previous post.
Title: Re: Issues Running the 'Script' Command
Post by: lethosor on October 31, 2015, 10:34:55 pm
What's the command you're typing into the DFHack console?