Python Pygame Fading Error When It Is In A Function

Python Pygame Fading Error When It Is In A Function