Jump to content

.temp:3: attempt to call nil

2 replies to this topic

#1 FoxtrotJeff

  • New Members
  • 2 posts
  • LocationWisconsin

Posted 29 April 2017 - 09:04 PM

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")



#2 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

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".

#3 FoxtrotJeff

  • New Members
  • 2 posts
  • LocationWisconsin

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