码迷,mamicode.com
首页 > 其他好文 > 详细

argument 1 must be 2-item sequence, not int

时间:2019-03-17 10:39:25      阅读:334      评论:0      收藏:0      [点我收藏+]

标签:大神   tps   pygame   代码   article   display   argument   not   details   

看了 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

标签:大神   tps   pygame   代码   article   display   argument   not   details   

原文地址:https://www.cnblogs.com/xyzpeng/p/10545331.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!