I think you have some form of compilation error. You shouldn’t need to define currentLoop and frameDur yourself.