Posted 12 December 2012 - 02:15 PM
I've started using advanced monitors for the first time, in order to make a graphical interface for my next massive project I'm not likely to ever finish.
I encountered an error while trying to display colors on a monitor
My code is this, which works perfectly fine, for writing the colors on the computer screen.
so clearly this is not the method I should use to draw on the monitors, but I can't figure out what is.
Further information: Using a simple shell.run is impractical, as I have this computer controlling multiple monitors using the peripheral cables addon, and if I were to use shell.run I would have to split up the information this computer receives to multiple other computers, which would involve editing my existing programs, which I don't want to do because I'm stubborn and obstinate, and there should be a way to do what I'm trying to do.</rant>
I encountered an error while trying to display colors on a monitor
My code is this, which works perfectly fine, for writing the colors on the computer screen.
m = peripheral.wrap("left")
for x=1,5,2 do
for y = 1,5,2 do
paintutils.drawPixel(x,y,colors.orange)
paintutils.drawPixel(x+1,y,colors.green)
end
end
However, if I attempt to instead draw on the monitor to the left, using the wrapped value, and change the code as such to
m = peripheral.wrap("left")
for x=1,5,2 do
for y = 1,5,2 do
m.paintutils.drawPixel(x,y,colors.orange)
m.paintutils.drawPixel(x+1,y,colors.green)
end
end
I encounter the error "attempt to index ? (a nil value)"so clearly this is not the method I should use to draw on the monitors, but I can't figure out what is.
Further information: Using a simple shell.run is impractical, as I have this computer controlling multiple monitors using the peripheral cables addon, and if I were to use shell.run I would have to split up the information this computer receives to multiple other computers, which would involve editing my existing programs, which I don't want to do because I'm stubborn and obstinate, and there should be a way to do what I'm trying to do.</rant>