I see a bug in his script. Find this line:

Code:
             if (can_lift(xx,yy) == 3) {this_dam = dam_3;)
and replace it with this one:

Code:
             if (can_lift(xx,yy) == 3) {this_dam = dam_3;}
(the brace at the end wasn't curly)

You need to re-import it to re-compile it.