My javascript is as follows:
console.log(comp + ' was updated to '+value);
$.post('http://clothing/change', JSON.stringify({
comp: comp,
value: value
}));
This code is successfully triggered as I get the console message. However, the following LUA doesn’t get triggered:
RegisterNUICallback('change', function(data, cb)
print('test')
cb('ok')
end)