SophieWalden / Grand-Expansion

A little simplistic game about resource management
6 stars 2 forks source link

Game crashes when I try to make food production #1

Closed Gageowe closed 5 years ago

Gageowe commented 5 years ago

Whenever I try to build a farm the game crashes

THB0705 commented 5 years ago

Yep, just clicking on it closes the game immediately :( , I had so much progress...

Traceback (most recent call last):
  File "game.py", line 1235, in <module>
    MainMenu(0)
  File "game.py", line 635, in MainMenu
    game_loop()
  File "game.py", line 1153, in game_loop
    draw(i * (640/width),j * (640/height) + 160,"Tile",board[j][i],height,width)
  File "game.py", line 536, in draw
    gameDisplay.blit(Images["City"],(x,y))
KeyError: 'City'

Looking into it a bit, it looks like you have no images for the farms in the source files which is why this error is being thrown. Considering we are trying to build a farm first, I'd say there is a mistake somewhere...

SophieWalden commented 5 years ago

Sorry, I'm replying late to this as I didn't see it earlier, but I will look into it. This error is happening because somehow the picture for the city wasn't in the images folder. I'm not sure if it was a mistake on my part or some weird bug, but sorry it happened to you. I haven't encountered the error with the farm, but I have that on my todo list to fix. I'm going to make a little To do list in the project tab of this directory that you guys can check on and maybe suggest things to add. To get the new image you either have to redownload the files or just download the image and put it in your already existing file.

THB0705 commented 5 years ago

This issue has been fixed and can be closed.