SHOW:
|
|
- or go back to the newest paste.
1 | - | elocal printer = peripheral.wrap("left") |
1 | + | local printer = peripheral.wrap("left") |
2 | ||
3 | if printer.getPaperLevel() == 0 then -- If there is no paper in the printer | |
4 | error("There is no paper in the printer!") | |
5 | end | |
6 | ||
7 | if printer.getInkLevel() == 0 then -- If there is no ink in the printer | |
8 | error("There is no ink in the printer!") | |
9 | end | |
10 | ||
11 | -- There is paper and ink in the printer, we can now print a page | |
12 | ||
13 | if printer.newPage() then | |
14 | printer.setCursorPos(1, 3) | |
15 | printer.write("Beetle Nursery -118,8,122,Erebus") | |
16 | ||
17 | printer.endPage() | |
18 | else | |
19 | error("Page could not be created.") | |
20 | end |