Difference between revisions of "Printer.getPaperLevel"
From ComputerCraft Wiki
MKlegoman357 (Talk | contribs) m (Expanded) |
MKlegoman357 (Talk | contribs) |
||
| Line 10: | Line 10: | ||
|desc=Prints how much paper there is in the printer (assuming there are 5 sheets of paper in the printer). | |desc=Prints how much paper there is in the printer (assuming there are 5 sheets of paper in the printer). | ||
|code= local printer = [[peripheral.wrap]]("left") | |code= local printer = [[peripheral.wrap]]("left") | ||
| − | local paperAmount = printer.getPaperLevel() | + | local paperAmount = '''printer.getPaperLevel()''' |
print("There is/are " .. paperAmount .. " sheet(s) of paper in the printer.") | print("There is/are " .. paperAmount .. " sheet(s) of paper in the printer.") | ||
Latest revision as of 17:48, 10 April 2014
| Returns the amount of paper in the printer. | |
| Syntax | printer.getPaperLevel() |
| Returns | number the amount of paper in the printer |
| Part of | ComputerCraft |
| API | printer |
Examples
| Prints how much paper there is in the printer (assuming there are 5 sheets of paper in the printer). | |
| Code |
local printer = peripheral.wrap("left") local paperAmount = printer.getPaperLevel() print("There is/are " .. paperAmount .. " sheet(s) of paper in the printer.") |
| Output | There is/are 5 sheet(s) of paper in the printer. |