title: PYTHON PYGAME Image
body: <p>Hey i'm just making a small game in python its python 2.7.13 i'm using cause i'm used to its syntax(lol i have a syntax error in a way its to do with TypeError: argument 1 must be pygame.Surface, not function) but i'm taking an image from the same directory and trying to display it on screen just to get the layout of the game but i can't get it to work the error i get is on this line</p>
  
  <pre><code>display.blit(floor,(x,y))
  </code></pre>
  
  <p>THE ERROR: 
       Traceback (most recent call last):
        File "1stgame.py", line 38, in 
          floor(x,y)
        File "1stgame.py", line 25, in floor
       display.blit(floor,(x,y))
  TypeError: argument 1 must be pygame.Surface, not function</p>
  
  <blockquote>
    <p>here's the code</p>
  </blockquote>
  
  <pre><code>import pygame
  
  #Start pygame
  
  pygame.init()
  
  #Window/Screen/Display
  
  display_x = 800
  display_y = 600
  display = pygame.display.set_mode((display_x,display_y))
  pygame.display.set_caption('Platforms')
  
  clock = pygame.time.Clock()
  
  #Colors
  
  black = (0,0,0)
  green = (1,166,17)
  
  #Images
  
  floor = pygame.image.load('rock.jpg')
  def floor(x,y):
      display.blit(floor,(x,y))
  x = (display_x * 0.45)
  y = (display_y * 0.8)
  
  not_dead=True
  while not_dead:
      for event in pygame.event.get():
          if (event.type==pygame.QUIT):
              not_dead=False 
  
      display.fill(black) 
      pygame.draw.rect(display, green, [0,550,800,50])
  
      floor(x,y)
  
  
      pygame.display.update()
      clock.tick(60)
  print "Hello"
  
  pygame.quit()
  </code></pre>