Add() argument after * must be an iterable, not int Pygame

后端 未结 1 1916
星月不相逢
星月不相逢 2021-01-14 01:43

Hello I am new to pygame and I am trying to write a shmup game. However I am always having this error:

TypeError: add() argument after * must be an it

相关标签:
1条回答
  • 2021-01-14 02:25

    You're passing the pos and the angle to the __init__ method of pygame.sprite.Sprite here,

    super(Bullets,self).__init__(pos,angle)
    

    but you can only pass sprite groups to which this sprite instance will be added. So just remove those arguments:

    super(Bullets,self).__init__()
    
    0 讨论(0)
提交回复
热议问题