Skip to content

bug: mac unexpected type 'float' #3

@makerjackie

Description

@makerjackie
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions