Draw function not working properly

Thank you all for the quick help, they were globals that I had defined at the start but since I never really used globals in normal python I forgot that I had to add the global statement in the function to modify them.

3 Likes