help MsTimer2

When I try to use MsTimer2 it says:
"projetTickTock2.0:6: error: ‘namespaceMsTimer2’ does not name a type

void flash(){

^

exit status 1
‘namespaceMsTimer2’ does not name a type"

This is the code I get the error: "

#include <MsTimer2.h>

#define LED 13

void flash(){
static boolean output = HIGH;

digitalWrite(LED, OUTPUT);
output = !output;
}

void setup() {
pinMode(13, OUTPUT);

MsTimer2::set(500, flash);
MsTimer2::start();
}"

Thanks

And where did you get the MsTimer2 library?

static boolean output = HIGH;Not the cause of your problem but why boolean/HIGH rather than byte/HIGH or boolean/true ?

 digitalWrite(LED, OUTPUT);

Do you actually have a variable named OUTPUT ?

Try making an instance of MsTimer instead of calling the class methods directly with ::

MsTimer2 indicator;
//...
indicator.set(500, flash);
  indicator.start();