Variables not declared in auto JS generation

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