This is my code
import pygame
pygame.init()
class Tiles:
size = 32
def Load_Texture(file, size):
bitmap = pygame.image.load(file)
bitmap = pygame.transform.scale(bitmap, (size, size))
surface = pygame.surface((size, size), pygame.HWSURFACE|pygame.SRCALPHA)
surface.blit(bitmap, (0, 0))
return surface
grass = Load_Texture("graphs\\grass.png", size)
stone = Load_Texture("graphs\\stone.png", size)
water = Load_Texture("graphs\\water.png", size)
and this is the error report
PS C:\Users\shuyi\Desktop\Programming\Python\RPG> & python c:/Users/shuyi/Desktop/Programming/Python/RPG/scripts/textures.py
Traceback (most recent call last):
File "c:/Users/shuyi/Desktop/Programming/Python/RPG/scripts/textures.py", line 5, in <module>
class Tiles:
File "c:/Users/shuyi/Desktop/Programming/Python/RPG/scripts/textures.py", line 16, in Tiles
grass = Load_Texture("graphs\\grass.png", size)
File "c:/Users/shuyi/Desktop/Programming/Python/RPG/scripts/textures.py", line 12, in Load_Texture
surface = pygame.surface((size, size), pygame.HWSURFACE|pygame.SRCALPHA)
TypeError: 'module' object is not callable
PS C:\Users\shuyi\Desktop\Programming\Python\RPG>
I dont understand why I get this error :(
could anyone pls explain this for me? I cant find a fitting solution on the net