The problem with the last script is that SetMaxHP doesn't do what you think it does. It doesn't take any arguments, and just sets the current hp to max. SetHP() seems to work fine, but it won't allow values higher than the max hp.
Of course, none of this solves your real problem, but it's all I know for sure while I'm sitting at work bored.
|