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

Computer/Monitor Program.

Started by applesauce10189, 26 January 2014 - 07:44 AM
applesauce10189 #1
Posted 26 January 2014 - 08:44 AM
This is a basic problem. I know the answer is in "Read This Before Posting" thing, and I know the error. I just don't know how I made the error or how to fix it while keeping that line of code. Here's my code.


local monitor = peripheral.wrap("up")
monitor.clear()
monitor.setCursorPos(1,1)
monitor.print("Welcome to Apple's house!")
monitor.print("To do list: ")
monitor.print("1. Fuel for turtle.")
monitor.print("2. Basic power/machinery.")

The error is on line 2. It's kind of been a short while since I've coded hence the mistake and my inability to find/fix it.

EDIT: Looked back on an older program and found the problem with this one. Now line 4 is attempt to call nil but I know how to fix that too. Sorry to waste the time of anybody who read this.
Edited on 26 January 2014 - 07:47 AM
wieselkatze #2
Posted 26 January 2014 - 09:22 AM
peripheral.wrap("up") should be peripheral.wrap("top")

There isn't a print function for monitors. Just use monitor.write() and monitor.setCursorPos().

EDIT: Came back and saw your edit right now.
Edited on 26 January 2014 - 08:23 AM