Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Issues Running the 'Script' Command  (Read 1226 times)

Kraiger

  • Bay Watcher
    • View Profile
Issues Running the 'Script' Command
« 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.
« Last Edit: October 27, 2015, 11:28:31 am by Kraiger »
Logged
This is a masterful image of Machunguroho, Torchsilver, the alicorn, a dark iron bastard sword, a volcanic aurum battle axe, a felsteel heater shield, and an emerald golem. The golem has been struck down. Torchsilver is making a triumphant pose.

lethosor

  • Bay Watcher
    • View Profile
Re: Issues Running the 'Script' Command
« Reply #1 on: October 27, 2015, 03:38:44 pm »

What is "the r4 version"? What exact commands are you running?
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Kraiger

  • Bay Watcher
    • View Profile
Re: Issues Running the 'Script' Command
« Reply #2 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 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.
Logged
This is a masterful image of Machunguroho, Torchsilver, the alicorn, a dark iron bastard sword, a volcanic aurum battle axe, a felsteel heater shield, and an emerald golem. The golem has been struck down. Torchsilver is making a triumphant pose.

lethosor

  • Bay Watcher
    • View Profile
Re: Issues Running the 'Script' Command
« Reply #3 on: October 31, 2015, 10:34:55 pm »

What's the command you're typing into the DFHack console?
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.