node.script doesn't receive the number zero 0 (Fixed in Max 8.1.2)
Dec 06 2019 | 7:03 pm
Hi all,
I'm trying to make a node script that will receive numbers from Max as input, I added a handler (Max.addHandler()) with Max.MESSAGE_TYPES.NUMBER as the first argument and I'm printing everything it receives to the Max console. It works fine except for 0. The handler doesn't get triggered. Is that expected behaviour? Is there a way to detect if a 0 is sent to a node.script?
// This is the content of zero.js const Max = require('max-api') Max.addHandler(Max.MESSAGE_TYPES.NUMBER, (number) => { Max.post("Number " + number) })