lift programming.rtf 530bytes
191 downloadsAny help would be greatly appreciated.
Posted 26 October 2012 - 01:08 PM
lift programming.rtf 530bytes
191 downloadsPosted 26 October 2012 - 01:11 PM
x = 13
if rs.getInput("top") then
while x >= 0 do
rs.setOutput("left", true)
sleep(0.5)
rs.setOutput("left", false)
sleep(0.5)
return x = x - 1
else os.reboot()
end
end
Posted 26 October 2012 - 01:18 PM
Posted 26 October 2012 - 01:20 PM
Posted 26 October 2012 - 01:25 PM
x = 13
if rs.getInput("top") then
repeat
rs.setOutput("left", true)
sleep(0.5)
rs.setOutput("left", false)
sleep(0.5)
return x = x - 1
until x == 0
end
But this gives me 'until' expected to close 'repeat' at line 3
Posted 26 October 2012 - 01:30 PM
x = 0
if rs.getInput("top") then
while x ~= 13 do
rs.setOutput("left",true)
sleep(0.5)
rs.setOutput("left",false)
sleep(0.5)
x = x+1
end
end
Posted 26 October 2012 - 01:31 PM
x = 13
if rs.getInput("top") then
for i=1,x do
rs.setOutput("left",true)
sleep(0.5)
rs.setOutput("left",false)
sleep(0.5)
end
end
Posted 26 October 2012 - 01:39 PM
0 members, 1 guests, 0 anonymous users