I’m having an infinite loop error in my endless runner game

It usually happens when a while loop doesn’t have an exit condition, or when two functions call each other.