Jump to content




Help with monitor


  • You cannot reply to this topic
2 replies to this topic

#1 civilwargeeky

  • Members
  • 393 posts

Posted 08 July 2012 - 08: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.

#2 KevinW1998

  • Members
  • 93 posts
  • LocationAustria(German)

Posted 08 July 2012 - 08: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 :)/>

#3 Pinkishu

  • Members
  • 484 posts

Posted 08 July 2012 - 08:59 PM

I think it needs to be
term.redirect(peripheral.wrap("right"))

edit: ninjaed XD





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users