Re: [Tutor] Weird Python Error

2013-10-18 Thread Alan Gauld
On 17/10/13 21:09, Zaid Saeed wrote: class YellowCar(pygame.sprite.Sprite): def __init__(self): pygame.sprite.Sprite.__init__(self) self.image = pygame.image.load("yellow.png") self.image = pygame.transform.scale(self.image,(50, 75)) self.rect = self.imag

Re: [Tutor] Weird Python Error

2013-10-17 Thread Danny Yoo
Hi Zaid, Your YellowCar will have one once its reset() has been called. However, I don't see it in __init__(), so there might be a period of time where it won't have one. I haven't traced through possible code paths where this happens, but I suspect one of them may. One example may be: c =

[Tutor] Weird Python Error

2013-10-17 Thread Zaid Saeed
First and foremost, here is the code: """ Player Car """ import pygame, random pygame.init() screen = pygame.display.set_mode((640, 480)) class RedCar(pygame.sprite.Sprite): def __init__(self): pygame.sprite.Sprite.__init__(self) self.image = pygame.imag