The main point it's getting stuck is after the read. I can input anything I want but it never prints any of the 3 text options. Can someone tell me what i'm missing here?
Spoiler
Posted 05 June 2014 - 10:05 AM
Posted 05 June 2014 - 12:31 PM
Posted 05 June 2014 - 01:00 PM
Posted 05 June 2014 - 01:24 PM
if floor == floor1 then
print("You are on Floor 1!")
elseif floor == floor2 then
print("Going to Floor 2!")
elseif floor == floor3 then
print("Going to Floor 3")
end
sleep(1)
end
Edited by Jiloacom, 05 June 2014 - 01:25 PM.
Posted 05 June 2014 - 01:37 PM
floor1="1"
floor2="2"
floor3="3"
while true do
term.clear()
term.setCursorPos(1,1)
print("This is Floor 1")
print("Which floor would you like?")
print("Please enter 1, 2, or 3.")
floor = read()
if floor == floor1 then
print("You are already on Floor 1!")
sleep(2)
elseif floor == floor2 then
print("Going to Floor 2!")
break
elseif floor == floor3 then
print("Going to Floor 3")
break
end
end
Edited by sEi, 05 June 2014 - 01:41 PM.
Posted 05 June 2014 - 02:29 PM
Posted 05 June 2014 - 05:07 PM
Posted 06 June 2014 - 12:58 AM
--computer 5 control computer
--bit 1 is up, bit 2 is down
function d1()
rs.setBundledOutput("left", 2)
sleep(1)
rs.setBundledOutput("left", 0)
end
function u1()
rs.setBundledOutput("left", 1)
sleep(1)
rs.setBundledOutput("left", 0)
end
while true do
print(rs.getBundledInput("back"))
os.pullEvent("redstone")
if rs.getBundledInput("back")==528 then --528 is cyan and yellow
repeat
d1()
until rs.getBundledInput("back")==256
end
end
Edited by Bubba, 06 June 2014 - 01:08 AM.
Code tags for readability
Posted 06 June 2014 - 02:20 AM
function d1()
rs.setBundledOutput("left", 2)
sleep(1)
rs.setBundledOutput("left", 0)
sleep(0.5)
end
CometWolf, on 05 June 2014 - 01:00 PM, said:
Posted 06 June 2014 - 02:55 AM
0 members, 1 guests, 0 anonymous users