Posted 27 December 2012 - 02:11 PM
os.unloadAPI("/rom/apis/sensorsAPI")
os.unloadAPI("/rom/apis/sensorsData")
os.unloadAPI("/rom/apis/sensorsUI")
os.loadAPI("/rom/apis/sensorsAPI")
os.loadAPI("/rom/apis/sensorsData")
os.loadAPI("/rom/apis/sensorsUI")
function printDict(data)
for i,v in pairs(data) do
print(tostring(i).." - "..tostring(v))
end
end
ctrl = sensors.getController()
data = sensors.getSensors(ctrl)
printDict(data)
This code should return a list of all connected sensors from the adjacent Sensor Controller…problem is, it just returns 1 sensor named "Sensor" ( I have 6 named sensors)I tested this in single player, works fine, not on SMP though, so is ccSensors-B017pr2 broken?