This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
civilwargeeky's profile picture

Help with monitor

Started by civilwargeeky, 08 July 2012 - 07:56 PM
civilwargeeky #1
Posted 08 July 2012 - 09:56 PM
So I'm really new to computercraft and programming in general, but I wanted to do a simple program to display on a monitor (so that I could go from it later).


local a = io.read()
local input = "pie"
if a == input then
term.clear()
textutils.slowPrint("It worked!")
term.redirect(right)
print("IT WORKED!!!")
else
term.clear()
print("It still worked")
end
This does not work and I don't understand why. Please help or explain.
KevinW1998 #2
Posted 08 July 2012 - 09:59 PM
you need to use peripheral.wrap("right")

monitor = peripheral.wrap("right")
term.redirect(monitor)
--Your code
term.restore()--back to the main computer screen

edit: woah was a bit faster Pinkishu :)/>/>
Pinkishu #3
Posted 08 July 2012 - 09:59 PM
I think it needs to be

term.redirect(peripheral.wrap("right"))

edit: ninjaed XD