Posted 02 January 2016 - 02:52 PM
I am attempting to write to a remote advanced monitor (not directly on the side of the advanced computer). Every time I receive this error .temp:10: attempt to index ? (a nil value)
The code I am using is
local mon1 = peripheral.wrap("monitor_5")
mon1.write("Test:")
I ran this program to verify the monitor name:
local periList=peripheral.getNames()
for i = 1, #perList do
print("I have a " ..peripheral.getType(perList).." attached as \"..perList.."\".")
end
This program verified the name of the monitor as "monitor_5". I receive a similar error when I try to write to the monitor directly from lua>
Is there a problem with my code (this is how I keep seeing it done on all the videos and forums) or is the problem in ComputerCraft?
Thanks
Tertius_
The code I am using is
local mon1 = peripheral.wrap("monitor_5")
mon1.write("Test:")
I ran this program to verify the monitor name:
local periList=peripheral.getNames()
for i = 1, #perList do
print("I have a " ..peripheral.getType(perList).." attached as \"..perList.."\".")
end
This program verified the name of the monitor as "monitor_5". I receive a similar error when I try to write to the monitor directly from lua>
Is there a problem with my code (this is how I keep seeing it done on all the videos and forums) or is the problem in ComputerCraft?
Thanks
Tertius_