does it make a difference if you change:
const char *relays[] = {"RELAY1","RELAY2","RELAY3","RELAY4","RELAY5","RELAY6","RELAY7","RELAY8"};
into:
const char* relays[] = {"RELAY1","RELAY2","RELAY3","RELAY4","RELAY5","RELAY6","RELAY7","RELAY8"};
(i have changed the "*" so it is after char, and not before the array name)