live.observer in javascript <undefined>

eric1606's icon

Hey guys,

Im trying to create an observer in M4L with javascript but I seem to be doing something wrong...

function bang() {
    var mute = new LiveAPI(mute_callback(), 'live_set tracks 0');
mute.property = "mute";
}

function mute_callback(args) {
    post(args, '\n');
}

When I call the bang() function I get <undefined> printed into my maxwindow, does anybody see what im doing wrong?

Thanks!,

Eric

eric1606's icon

Ah found the problem myself :

var mute = new LiveAPI(mute_callback(), 'live_set tracks 0');\

mute_callback() should of course be without the ()...