printer.getInkLevel
From ComputerCraft Wiki
| Returns the amount of ink in the printer's ink slot. | |
| Syntax | printer.getInkLevel() |
| Returns | number amount of ink in the printer. |
| Part of | ComputerCraft |
| API | printer |
Examples
| Prints how much ink there is in the printer (assuming there are 6 ink sacs in the printer). | |
| Code |
local printer = peripheral.wrap("left") local inkAmount = printer.getInkLevel() print("There is/are " .. inkAmount .. " dye(s) in the printer.") |
| Output | There is/are 6 dye(s) in the printer. |