这是我的代码
def refresh(self,attachedSlotPos,srcSlotPos):
attrSlot = [player.GetItemAttribute(attachedSlotPos, i) for i in
xrange(player.ATTRIBUTE_SLOT_MAX_NUM)]
错误:
0819 15:37:27441 :: File "uiswitch.py", line 144, in refresh
0819 15:37:27441 :: TypeError
0819 15:37:27441 :: :
0819 15:37:27441 :: an integer is required
我该如何解决? for python27
答案 0 :(得分:0)
如果错误在此行中,那么xrange()
的参数很可能不是整数。