Error in code c++ (count-to-n)


#1

I can not know why this code gives me error

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {

    Number count = getValue<output_OUT>(ctx);
    Number n = getValue<input_N>(ctx);
    if (isInputDirty<input_INC>(ctx)) {
        count += 1;
        if (count < n) {
            emitValue<output_ACT>(ctx, false);
        } else if (count = n) {
            emitValue<output_ACT>(ctx, true); // time to calculate the sync pulse...
        } else {
            count = 0;
        }
    emitValue<output_OUT>(ctx, count);
}
C:\Users\Cesar\AppData\Local\Temp\xod_temp_sketchbook3a4hEN\xod_1546794941572_sketch\xod_1546794941572_sketch.ino:3066:1: error: 'xod__core__delay' does not name a type
 xod__core__delay::Node node_23 = {
 ^
C:\Users\Cesar\AppData\Local\Temp\xod_temp_sketchbook3a4hEN\xod_1546794941572_sketch\xod_1546794941572_sketch.ino:3075:1: error: 'xod__core__flip_flop' does not name a type
 xod__core__flip_flop::Node node_24 = {
 ^
...........................................................
...........................................................

#2

this was missing

        }
    >>>    }  <<<
    emitValue<output_OUT>(ctx, count);
}

count-n.xodball (30.7 KB)


#3

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.