<1>local variable '***' referenced before assignment
变量使用前未定义
函数中的某一变量被赋值后会被认为是局部变量,当在函数外被调用时 会出现如此错误
解决方法:在变量前添加 global ***
<2> ‘NoneType’ object has no attribute to '***'
实例:next_scene_name = current_scene.enter()
原因:所有到的类并没有加载进来
<3>‘builtin_function_or_method object has no attribute to '***'
实例:print Death.quips[randint(0,len(self.quips)-1)]
内置函数或方法对象没有获取项目属性
例如 range(1,5) 写成 range[1,5]