I am very confused on how the code is incorrect, I am new to ComputerCraft, currently using version ComputerCraft1.74.
Here is the code used:
monitor = peripheral.wrap("top")
monitor.setTextScale(2)
monitor.setBackgroundColor(colors.white)
monitor.clear()
monitor.setCursorPos(11,1)
monitor.setTextColor(colors.purple)
monitor.write("Welcome!")
0
.temp:3: attempt to call nil
Started by FoxtrotJeff, Apr 29 2017 09:04 PM
2 replies to this topic
#1
Posted 29 April 2017 - 09:04 PM
#2
Posted 30 April 2017 - 03:30 AM
Assuming your third line is:
... then the error is telling you that you were successfully able to wrap a peripheral located above your computer, but it's not a monitor and hence doesn't have a "setTextScale" function to offer you.
For example, you might've placed a wired modem above your computer, which leads to a monitor. In that case, you'd be wrapping the modem instead of the display - "activating" the other modem attached to the monitor itself (by right clicking it) will give you its "network name", and you should be wrapping that instead of "top".
monitor.setTextScale(2)
... then the error is telling you that you were successfully able to wrap a peripheral located above your computer, but it's not a monitor and hence doesn't have a "setTextScale" function to offer you.
For example, you might've placed a wired modem above your computer, which leads to a monitor. In that case, you'd be wrapping the modem instead of the display - "activating" the other modem attached to the monitor itself (by right clicking it) will give you its "network name", and you should be wrapping that instead of "top".
#3
Posted 30 April 2017 - 04:05 PM
Thank you, I didn't know you had to use the network name of the monitor.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users