robot debug
This commit is contained in:
parent
aa75bd313e
commit
c9e8a46743
@ -8,7 +8,7 @@ end
|
|||||||
|
|
||||||
return function(gate, argv)
|
return function(gate, argv)
|
||||||
print("robot input")
|
print("robot input")
|
||||||
print(argv[1])
|
print("\""..argv[1].."\"")
|
||||||
for word in argv[1]:gmatch("[^\t]+") do
|
for word in argv[1]:gmatch("[^\t]+") do
|
||||||
local first, rest = word:sub(1, 1), word:sub(2, #word)
|
local first, rest = word:sub(1, 1), word:sub(2, #word)
|
||||||
local vec = {}
|
local vec = {}
|
||||||
@ -28,7 +28,7 @@ return function(gate, argv)
|
|||||||
gate.brickren = vec[7]
|
gate.brickren = vec[7]
|
||||||
intToPort(gate, 15, 6, gate.brickcolor)
|
intToPort(gate, 15, 6, gate.brickcolor)
|
||||||
Gate.setportstate(gate, 21, gate.brickexists)
|
Gate.setportstate(gate, 21, gate.brickexists)
|
||||||
else error("invalid control word given to robot: "..word) end
|
else error("invalid control word given to robot: \""..word.."\".. (first \""..first.."\")") end
|
||||||
end
|
end
|
||||||
gate.waiting = false
|
gate.waiting = false
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user