I am making a game with pygame and I have a file called "settings_template.py" and another file called "pygame_functions.py" and when I import in my variables it gives me an error "NameError: name 'FPS' is not defined" however, I defined "FPS" in "settings_template.py". I don't know what the problem is and I've tried everything.
This is in my "settings_template.py"
FPS = 10 # how fast the game runs (frames per second)
and this is in my "pygame_functions.py"
from settings_template import *
def showSprite(sprite):
global FPS
spriteGroup.add(sprite)
gameClock.tick(FPS) # changed updateDisplay to tick for better framerate
I also tried it without global FPS
but it made no difference. If anyone could help me out I will be eternally grateful :)