Can Some One Help Me With My Code 05-13-2014, 02:57 AM
#1
I am using python 2.7 and i was just working with python making a pong game but i keep getting the error message "Traceback (most recent call last):
File "C:\Python27\Ping.py", line 13, in <module>
GO()
NameError: name 'GO' is not defined"
Here is my code-
---------------------------------------------------------------
File "C:\Python27\Ping.py", line 13, in <module>
GO()
NameError: name 'GO' is not defined"
Here is my code-
---------------------------------------------------------------
Code:
import os, sys
import pygame
from pygame.locals import*
screen=pygame.display.set_mode((640,480))
PADDLE_WIDTH=50
PADDLE_HEIGHT=10
p1Paddle=pygame.Rect(10,430,PADDLE_WIDTH,PADDLE_HEIGHT)
PADDLE_COLOR = pygame.color.Color("red")
SCREEN_COLOR = pygame.color.Color("black")
GO
puckSpeedX=1
puckSpeedY=1
PUCK_COLOR=pygame.color.Color("green")
puck=pygame.Rect(320,240,10,10)
GO
while True:
p1Paddle.left = pygame.mouse.get_pos()[0]
puck.left = puck.left + puckSpeedX
puck.top = puck.top + puckSpeedY
screen.fill(SCREEN_COLOR)
GO
screen.fill(PADDLE_COLOR, p1Paddle)
screen.fill(PUCK_COLOR, puck)
pygame.time.delay(10)
pygame.display.flip()
GO
if puck.colliderect(p1Paddle):
puckSpeedY=puckSpeedY*-1
if puck.top < o or puck.bottom > 480:
puckSpeedY=puckSpeedy*-1
if puck.left < o or puck.right > 640:
puckSpeedX=puckSpeedX*-1

![[+]](https://sinister.li/images/modern/collapse_collapsed.png)
