You 'defined' them but did not 'declare' them.
class ResetValueTimer {
public :
static unsigned long calledTimeString;
static int stringCalled;
static String resetIn(String from, String to, unsigned long interval) {
if (!stringCalled) {
calledTimeString = millis();
calledTimeString = 1;
}
if (millis() - calledTimeString >= interval) {
stringCalled = 0;
return to;
}
return from;
}
};
unsigned long ResetValueTimer::calledTimeString;
int ResetValueTimer::stringCalled;
void setup() {
}
String foo = "HELLO WORLD";
String boo = "BYE WORLD";
void loop() {
foo = ResetValueTimer::resetIn(foo, boo, 2000);
boo = ResetValueTimer::resetIn(boo, "NOTHING NOT CHANGE", 2000);
Serial.print("foo : ");
Serial.print(millis() / 60);
Serial.print(": " + foo);
Serial.print("| boo : ");
Serial.print(millis() / 60);
Serial.println(": " + boo);
}