Syntax error on line 17: unpaired '{' .
        if (state == HEATING) {
