On Sat, Feb 6, 2010 at 7:56 PM, Stijn . <stijnnederl...@hotmail.com> wrote: > class Line(): #The class > def __init__( self, start_dot, end_dot, width): #init function > self.start_dot = start_dot > self.surface = pygame.Surface((w, h), SRCALPHA) > self.surface.fill((0,0,0,0)) > self.end_dot = end_dot > self.width = width > self.selected = 0 > self.tempX1 = start_dot.x > self.tempY1 = start_dot.y > self.tempX2 = end_dot.x > self.tempY2 = end_dot.y > self.visibleTemp1 = self.start_dot.visible > self.visibleTemp2 = self.end_dot.visible > self.draw = 0 > self.lastWasMove = 0 > self.Draw(1) > self.rico = 0 > def Draw ( self, typeOf ): #draw function > if ((self.start_dot.x > self.end_dot.x) and (self.start_dot.y != > self.end_dot.y)):
(1) Are you sure you want all those superfluous parentheses? > self.rico = (self.start_dot.x - self.end_dot.x / > abs(self.start_dot.y - self.end_dot.y) (2) You're missing a closing parenthesis. > else: #<-causes error message > if ((self.start_dot.x < self.end_dot.x and self.start_dot.y != > self.end_dot.y)) (3) Don't forget the colon. (4) See (1) > self.rico = (self.end_dot.x - self.start_dot.x) / > abs(self.start_dot.y - self.end_dot.y) > else: > self.rico = 0 HTH, benno. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor