Difference between revisions of "Printer.getInkLevel"

From ComputerCraft Wiki
Jump to: navigation, search
m (Moved to CAT:LuaCoreFunctions)
m (Int linking fix.)
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=printer.getInkLevel
 
|name=printer.getInkLevel
|returns=[[int|(int)]] Amount of ink in printer.
+
|returns=[[int (type)|int]] Amount of ink in printer.
 
|api=peripheral
 
|api=peripheral
 
|addon=ComputerCraft
 
|addon=ComputerCraft

Revision as of 18:31, 30 November 2012


Grid Redstone.png  Function printer.getInkLevel
Tells you how much ink is in the printer.
Syntax printer.getInkLevel()
Returns int Amount of ink in printer.
Part of ComputerCraft
API peripheral

Examples

Grid paper.png  Example
Prints true if there's ink in the printer.
Code
print(printer.getInkLevel() > 0)
Output true if there is ink in the printer, false if there isn't ink.