Posted 31 January 2016 - 09:30 PM
hello there fellow Coders I am attempting to build the ultimate Lock for a piston Door that will secure my applied energistics Core and only allow certain people to enter and leave… the build uses project red bundled wires and the open periphial sensor. I tried everything to get this to work but to no success.. I keep getting the error DoorLock:12: Expected String, Number…
please help
please help
- local sensor = peripheral.wrap("top")
local output = ("right")
local initial = ("colors.combine(colors.white, colors.orange)")
local minX = ("-5")
local maxX = ("5")
local minY = ("5")
local MaxY = ("5")
local MinZ = ("-2")
local MaxZ = ("2")
redstone.setBundledOutput(output,initial)
function getLocation()
info = sensor.getPlayerData(name)
pos = info.position
if pos.x >= minX and pos.x <= maxX and
pos.y >= minY and pos.y <= maxY and
pos.z >= minZ and pos.z <= maxZ then
redstone.setBundledOutput(output1, not initial)
end
end
while true do
players = sensor.getPlayerNames()
if players == 0 then
redstone.setBundledOutput(output1, initial)
sleep(0.7)
else
if name == "name1" then
getLocation()
break
else
if name == "name2" then
getLocation()
break
else
if name == "name3" then
getLocation()
break
else
if name == "name4" then
getLocation()
break
end
end
end
sleep(0.5)
end
end
end
Edited on 31 January 2016 - 09:52 PM