Syntax error on line 21: unpaired '{' .
        if (active) {
