我不斷收到此錯誤我感到困惑的這個錯誤
TypeError: unsupported operand type(s) for +: 'int' and 'str'
在我下面的代碼:
done = False
while not done:
if You.Hit_points > 0 and Opponent.Hit_points > 0:
move = raw_input("Would you like to make a move? (y/n) ")
if move == "y":
print "",You.name,"hit ",Opponent.name," by",You.Hit_points," hit points!"
Opponent.Health = You.Hit_points + You.Skill_points + Opponent.Health
謝謝!
再次閱讀錯誤。真的很慢。 – 2013-05-08 04:01:14
你給一個字符串添加一個數字,不允許。要麼所有的數字或所有的字符串。 – 2013-05-08 04:01:35