WolfChen1996 / DesktopPet

我的梦想,是让每个人都可以轻松地制作属于自己的桌宠!
84 stars 12 forks source link

bug: mac unexpected type 'float' #3

Open Jackiexiao opened 5 months ago

Jackiexiao commented 5 months ago
python pet-mac.py
Traceback (most recent call last):
  File "/Users/jackiexiao/Downloads/temp/DesktopPet/pet-mac.py", line 687, in <module>
    pet = App()
          ^^^^^
  File "/Users/jackiexiao/Downloads/temp/DesktopPet/pet-mac.py", line 154, in __init__
    self.timer.start(gamespeed)
TypeError: arguments did not match any overloaded call:
  start(self, msec: int): argument 1 has unexpected type 'float'
  start(self): too many arguments

强行改为 self.timer.start(1) 后,新报错是

./data/cat1/stand1.png
Traceback (most recent call last):
  File "/Users/jackiexiao/Downloads/temp/DesktopPet/pet-mac.py", line 230, in game
    self.move(petleft,pettop)
TypeError: arguments did not match any overloaded call:
  move(self, a0: QPoint): argument 1 has unexpected type 'float'
  move(self, ax: int, ay: int): argument 1 has unexpected type 'float'
[1]    82911 abort      python pet-mac.py
WolfChen1996 commented 3 weeks ago

Fixed.