argument 1 must be 2-item sequence, not int

Posted xyzpeng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了argument 1 must be 2-item sequence, not int相关的知识,希望对你有一定的参考价值。

看了 https://blog.csdn.net/qq_18250439/article/details/80872425  的说明,才明白为什么错了。

当使用Python3-pygame时出现TypeError: argument 1 must be 2-item sequence, not int提示

原始代码:


screen =pygame.display.set_mode(SCREEN_WIDTH,SCREEN_HEIGHT)

应改为:

screen =pygame.display.set_mode((SCREEN_WIDTH,SCREEN_HEIGHT),0,32)

 或者

screen =pygame.display.set_mode([SCREEN_WIDTH,SCREEN_HEIGHT])

感谢大神。

以上是关于argument 1 must be 2-item sequence, not int的主要内容,如果未能解决你的问题,请参考以下文章