mon = peripheral.wrap("right")
mon.clear()
mon.setCursorPos(1,1)
x,y = mon.getSize()
i = 1
for n,m in pairs(rs.getSides()) do
mon.setCursorPos(1,i)
mon.write(disk.getAudioTitle(m))
i = i + 2
end
Any suggestions why it's not printing?
Posted 19 April 2013 - 09:48 AM
mon = peripheral.wrap("right")
mon.clear()
mon.setCursorPos(1,1)
x,y = mon.getSize()
i = 1
for n,m in pairs(rs.getSides()) do
mon.setCursorPos(1,i)
mon.write(disk.getAudioTitle(m))
i = i + 2
end
Posted 19 April 2013 - 10:04 AM
Posted 19 April 2013 - 10:22 AM
Posted 19 April 2013 - 02:21 PM
Posted 19 April 2013 - 02:28 PM
Sariaz, on 19 April 2013 - 02:21 PM, said:
mon.write(n..": ".. (disk.getAudioTitle(m) or "No disk")) --The or is what's important here: it just specifies that if disk.getAudioTitle returns false or nil, it should print "No disk" instead
Posted 19 April 2013 - 03:23 PM
if disk.getAudioTitle(m) then mon.write(getAudioTitle(m)) i = i+2 end
mon.write(disk.getAudioTitle(m) or "No disk on "..m.." side.")
0 members, 3 guests, 0 anonymous users